Page 1 of 1

PyCharm "ModuleNotFoundError: No module named 'neuron'"

Posted: Mon Jan 24, 2022 2:43 am
by sangwonc

I am trying to run NEURON on PyCharm, but it produces the following error:
/Users/sangwoncha/PycharmProjects/VGCC_v2/venv/bin/python /Users/sangwoncha/PycharmProjects/VGCC_v2/venv/
Traceback (most recent call last):
File "/Users/sangwoncha/PycharmProjects/VGCC_v2/venv/", line 1, in <module>
from neuron import h, rxd
ModuleNotFoundError: No module named 'neuron'

Process finished with exit code 1
Previously, I ran NEURON on JupyterLab/Notebook and it worked perfectly fine. I am using an Intel MacBook Pro, which is using BigSur 11.6.2.

Any ideas on how to fix this? I'm relatively new to programming, and if there is any information needed to troubleshoot, I'll do my best to provide them. Thanks

Re: PyCharm "ModuleNotFoundError: No module named 'neuron'"

Posted: Thu Feb 10, 2022 6:57 am
by RBJ
I am just a bystander here, but since I do have NEURON (7.6) working well with PyCharm, using an Anaconda environment on one of our Macs, I thought perhaps I would paste up the all important configuration I have:

Script path:

Code: Select all

Parameters: None

Environment variables:

Code: Select all

Python Interpretter:

Code: Select all

Python 3.7 (myNEURON) ~opt/anaconda3/envs/myNEURON/bin/python
Obviously in Anaconda I had previously setup myNEURON as the environment with Numpy etc installed. NEURON itself installed from the binary, NOT pip.

Working Folder:

Code: Select all

This naturally includes the script and the x86_64 folder populated my mkdll

Then the add source and content roots to PYTHONPATH both ticked.

Hope you can resolve your issue.