On Friday, May 31, 2019 11:41 PM, gerlach.mi@gmx.de [gerlach.mi@gmx.de] wrote:
Hello,
I am using Anaconda on a Mac OS X platform. I installed nest using homebrew by following the instructions on this page:
https://nest-simulator.readthedocs.io/en/latest/installation/mac_install.htm...
That sounds like you have installed some components via Anaconda and others via Homebrew - the instructions there talk about using either Anaconda *OR* Homebrew.
After finishing the installation, IPython first could not find the nest module, so I manually copied the nest folder that was created in /Users/name/opt/nest/lib/python3.7/site-packages/nest into /anaconda/lib/python3.7/site-packages/nest
For the most part, moving directories around like that is a bad idea unless you are very sure of what you are doing (and even then, in my experience, it often causes maintenance issues in the long run).
From the top of my head, two things come to mind. First, it sounds like your IPython comes from Anaconda, but this possibly isn't detected by NEST's build scripts, so it might make sense to point cmake in the right direction, e.g.
cmake -DPYTHON_EXECUTABLE=/anaconda/bin/python3
(replace the path with the correct one for your environment). Second, if the build scripts actually did detect the right Python binary, it might be sufficient to add /Users/name/opt/nest/lib/python3.7/site-packages to your PYTHONPATH, e.g., by running IPython as
env PYTHONPATH=/Users/name/opt/nest/lib/python3.7/site-packages ipython
(this is *instead* of moving that directory - although doing both should not cause any additional harm).
Now IPython can import the nest module, but returns an error message when I try to run a basic nest example: "module 'nest' has no attribute 'Create' ".
I am not quite sure, but given that you moved stuff around manually it is possible that the Python module "nest" can no longer load (find) the library providing this symbol. Setting LD_LIBRARY_PATH to whatever directory contains pynestkernel.so might help.
I am sorry for failing at a very basic level here, but I tried for quite some time and could not get it running despite trying different instructions. I would greatly appreciate it if anyone could help me or give me a hint into the right direction, thanks in advance!
My primary suggestion is to consistently use a single Python installation/distribution, be it a binary installation of Anaconda, Anaconda installed via Homebrew, Python installed via Homebrew, or anything else that comes to mind (e.g., all built/installed by hand).
I hope this helps at least a bit, Harold