According to the docs, there are several ways to install python packages:
- using
distutils
- runningpython setup.py install
installs the package tosite-packages
of your current distribution; - passing
--user
tosetup.py install
installs module to~/.local/lib/python2.7/site-packages
on Unix, and this directory in under normal conditions always included insys.path
; - passing
--home=$HOME
tosetup.py install
installs module under$HOME
directory. This directory should be included tosys.path
explicitly; - modifying python search path:
you can do either
import sys
sys.path.append('/opt/nest/lib/python2.7/site-packages')
in the beginning of your script; or your can add
PYTHONPATH=/opt/nest/lib/python2.7/site-packages
export PYTHONPATH
in the end of your ~/.bash_profile
file.
UPDATE:
Just tried to install nest
and found that it comes in two flavours - 32bit (under /opt/nest/lib
) and 64bit (under /opt/nest/lib64
). You might have tried to use 32-bit python package with 64-bit python distribution. Try to change the string in ./zshrc
to
PYTHONPATH=/opt/nest/lib64/python2.7/site-packages
and see if it works. It works for me at least.