My python version in mac is 3.8 but I need 3.7 so I create environment python 3.7, and install the nest with conda. But when I import nest, there is still the error:ModuleNotFoundError: No module named 'nest'.
I checked the python3.7/site-packages, there is the nest:
2 Answers
It sounds like you're running the wrong Python binary (native version instead of 3.7). If you want to use a specific Python version, you could add it's install location to your $PATH before the system version.
You could use a tool like pyenv to help you manage your selected Python version (see this article).

- 617
- 4
- 16
When using an IDE (xcode, pycharm, etc.), it may not be aware of your conda environment and use the system python (which doesn't know about the conda installed NEST). You could check the corresponding runtime environment settings in the IDE to correctly reflect your py37
conda environment.
However, when you run python --version
in your environment on the shell, it should correctly give 3.7 and the "which python" should point to your conda installed Python version in the py37
environment. If this is the case then python -c "import nest"
should work.
(this answer could also help with the setup)

- 265
- 1
- 2
- 12