NEST is not a Python package and the Python modules rely on libraries of the compiled modules being available in known locations. When using for example a Conda flavor, you can install NEST with cmake -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
(when inside the target environment) to have everything installed into the environments directory tree.
For the self-built modules, the same requirements hold and in addition to the .py
files being in a directory where the corresponding Python looks for its modules (e.g. .../site-packages
), the created .so
files need to be in a place where the dynamic loader can find them.
Try to copy the .so
file into the NEST install directory path/to/installed/lib/nest/
and the python files into the site-packages
for your environment. pynest
itself also has a setup.py
that you find in your build directory in pynest/setup.py
. The python package is however not meant to be distributed separately, because of the aforementioned binary dependencies.
Be aware that you have to take care about consistency. You can not use a module compiled for one Python version with another Python, etc. Generally, the dependencies are a tricky thing and using e.g. libGSL in your module should also be the same one as used when compiling NEST, etc. This goes down to basically also using the same compiler.