Page 1 of 1

Installing NEURON with Python using pip

Posted: Tue Jun 30, 2015 4:44 am
by romain.caze
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?).

Best,
R.

Re: Installing NEURON with Python using pip

Posted: Sun Jun 19, 2016 3:10 pm
by eforzano
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.