1

I tried to install my project as a package so I can import functions from my src folder. In my conda env in the root folder of my project in the terminal I tried pip install -e ./ and (after uninstalling my first attempt) python -m pip install -e ./, both of which resulted in

Installing collected packages: gliders
Running setup.py develop for gliders
Successfully installed gliders

and the package showing up when I did conda list as

Name                    Version                   Build  Channel 
gliders                   0.1.0                     dev_0    <develop>

However when I run code with import gliders in my Jupyter notebook, I get the following error: ModuleNotFoundError: No module named 'gliders'

I am using Python 3.6.13.

How can I fix this error?

reed
  • 11
  • 2
  • if you are using conda, you need to ensure your conda environment is up. simply by --> conda activate – Ade_1 May 27 '21 at 15:11
  • I did ```conda activate myenv``` – reed May 27 '21 at 15:29
  • okay since your environ is active, conda install pip then try your above pip command again\ – Ade_1 May 27 '21 at 15:30
  • It is the same result as before – reed May 27 '21 at 15:37
  • How do you verify that the Jupyter kernel corresponds to the environment? – merv May 27 '21 at 15:53
  • Does the package actually export a module named `gliders` (i.e., has a `gliders/__init__.py` file)? [Packages and modules are distinct entities](https://stackoverflow.com/q/7948494/570918). – merv May 28 '21 at 18:46

0 Answers0