So I am trying to do a manual installation of the NEURON Python module on Linux Mint 18. The reason that I am doing installing it that way is that I tried installing from the .deb, and I got an import error.

when I try to install manually using setup.py, I get the following message:

Based on this error, it looks as though setup.py was not written properly. I would greatly appreciate if anyone has any suggests regarding how I can fix this. I need the NEURON Python module for a school project.

I just installed NEURON under Mint18.3 just 2 weeks ago, and setup.py ran without problems. I started with the latest development source code from Github and allowed NEURON to be installed into its default location /usr/local/nrn. Of couse that required invoking sudo for the make install steps, and also for the setup.py install step. What source code did you use, and where did you install NEURON?

Thank you very much for your reply. That sounds like the same procedure that I tried to follow. Did you run setup.py through Python 3.5 or Python 2.7? I was also wondering if there are any environmental variables that need to be set or installation option flags that need to be selected in order for the NEURON Python module to run.

I use NEURON and idraw from the command line, so in .bashrc I inserted
PATH= $PATH:/usr/local/iv/x86_64/bin:/usr/local/nrn/x86_64/bin

If you plan to launch Python and import nrn, you'll need to specify PYTHONPATH
A correct statement to set the PYTHONPATH will be something like
export PYTHONPATH=/where/you/installed/neuron/lib/python
The '/where/you/installed/neuron' would be the --prefix you specified with configure. In the case of installation to the default location /usr/local/nrn, the statement would be
export PYTHONPATH=/usr/local/nrn/lib/python

Test NEURON:
cd ~/bin/nrn/x86_64/bin
./neurondemo
Choose the "Release" and click on Init & Run
Verify that the graphs show traces of ica, cai, v.
When done, NEURON Main Menu / File / Quit

5. Update $PATH
cd ~
cp .bashrc BASHRC_0
cp BASHRC_0 BASHRC_1

Append these two lines to the end of BASHRC_1:
PATH=$PATH:$HOME/bin/iv/x86_64/bin:$HOME/bin/nrn/x86_64/bin
export PATH

Then write BASHRC_1 to disk and
cp BASHRC_1 .bashrc

Logout, then login.

6. Tests and usage
nrniv -python
or
nrngui -python
should bring up NEURON with Python as its interpreter.
The latter will load the standard run library and bring up the NEURON Main Menu toolbar.

python
from neuron import h
will launch Python, then import NEURON's h module by itself (more or less equivalent to nrniv -python)
and
python
from neuron import h,gui
will launch Python, then import NEURON's h and gui modules (more or less equivalent to nrngui -python).