python-2.7python-importimporterrornest-simulator

Pynest ImportError: no module named nest


Today I got PyNest working, after I followed the instructions about installation etc. from their official site. My problem is that I have to run the following command before I can successfully import nest, otherwise I get an "ImportError: No module named nest" :

export PYTHONPATH=/opt/nest/lib/python2.7/site-packages:$PYTHONPATH

I found about this command on the official link I gave you above, but I don't understand why this happens. What I can guess is that, this command "shows" where my nest/python files are, but how can I make this command permanent, so I won't have to run in before every trial?

EDIT1: I tried @SumitGupta 's answer and I can now import it when I run python from a terminal, but I get the same error when I try to import nest from Geany or iPython.

(i use Ubuntu 12.04 through VMware virtualization from win8.1 if it matters)


Solution

  • Ok the trick was to install nest in a directory like: '/home/username/opt/nest' cause otherwise nest won't find python by itself. For example this didn't work: '/~/opt/nest' Also, be sure to install all the required libraries before the installation (libgsl,libncurse etc.). If you do these two things, you will probably never meet any of my problems.