PyCharm "ModuleNotFoundError: No module named 'neuron'"

Post Reply
Posts: 10
Joined: Sun Nov 07, 2021 7:13 pm

PyCharm "ModuleNotFoundError: No module named 'neuron'"

Post 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
Posts: 62
Joined: Sun Aug 02, 2015 4:28 am
Location: UK

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

Post 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.
Post Reply