Installing NEURON with Python using pip

When Python is the interpreter, what is a good
design for the interface to the basic NEURON

Moderator: hines

Post Reply
Posts: 16
Joined: Fri Oct 29, 2010 6:22 am

Installing NEURON with Python using pip

Post by romain.caze » Tue Jun 30, 2015 4:44 am

Dear All,

I installed the last version of 7.4. But I still have to modify my python path to be able to import neuron in Python. Exactly I have to add to my .bashrc

Code: Select all

export PYTHONPATH=/usr/local/nrn/lib/python/
So that I do not have an error when I am importing neuron (so python knows where to find neuron).

I know this is not a problem for many people, but wouldn't it be simpler to have neuron install with pip (a great program to install python packages). At least it would be nice to explain this line in the NEURON documentation (or I am the only one with this problem?).


Posts: 1
Joined: Sat Jun 18, 2016 7:20 pm

Re: Installing NEURON with Python using pip

Post by eforzano » Sun Jun 19, 2016 3:10 pm

Hi R,

Your bit of code saved my life. I did the same thing and python would not recognize neuron.
What is weird. Is I have to define the pythonpath each time I load terminal. Anyway to fix this?

Update: What I ended up doing is editing my ~/.bashrc file, and added it to the path, so it boots each time. Im not sure if this way is hacky but it works.

Post Reply