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...
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
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 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!
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
On Saturday, June 1, 2019 11:55 PM, Gutch, Harold [harold.gutch@ds.mpg.de] wrote:
On Friday, May 31, 2019 11:41 PM, gerlach.mi@gmx.de [gerlach.mi@gmx.de] wrote:
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.
On macOS, use DYLD_LIBRARY_PATH instead.
Apologies for the confusion, Harold
Hello Harold,
thanks a lot for your thorough response, I really appreciate it. Unfortunately I could not get Nest running. I tried around various solutions and also installed Nest through conda-forge, but none of the provided builds worked, some even corrupted the whole Anaconda setup. I then installed Anaconda via Homebrew and installed Nest via Homebrew as well. Here the same issue as above appeared, Python returns "No module named 'nest'" after "import nest". I tried copying the nest folder that was created by Homebrew into the site packages folder of Python, only to get "module 'nest' has no attribute 'Create'" again. When I run "cmake -DPYTHON_EXECUTABLE=/anaconda/bin/python3", the terminal returns: "The source directory "/Users/name" does not appear to contain CMakeLists.txt." I tried changing the working directory to the directory that does contain CMakeLists.txt, but this did not work, either. Is there a different approach I could try or a step I could have missed?
Best regards, Michael
Hi Michael,
with respect to the conda-forge package, could you provide us with the exact steps you used? We currently have a pull request on Github with instructions for the following install procedure; we recommend creating a new conda environment before installation:
conda create --name ENVNAME
conda activate ENVNAME
install nest without openmpi:
conda install -c conda-forge nest-simulator
OR
install nest with openmpi:
conda install -c conda-forge nest-simulator=*=mpi_openmpi*
Let us know if the same problems persist.
best regards,
Jessica
On 2019-06-02 12:27 a.m., Gutch, Harold wrote:
On Saturday, June 1, 2019 11:55 PM, Gutch, Harold [harold.gutch@ds.mpg.demailto:harold.gutch@ds.mpg.de] wrote:
On Friday, May 31, 2019 11:41 PM, gerlach.mi@gmx.demailto:gerlach.mi@gmx.de [gerlach.mi@gmx.demailto:gerlach.mi@gmx.de] wrote:
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.
On macOS, use DYLD_LIBRARY_PATH instead.
Apologies for the confusion, Harold _______________________________________________ NEST Users mailing list -- users@nest-simulator.orgmailto:users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.orgmailto:users-leave@nest-simulator.org
-- -------------------------- Dr. Jessica Mitchell
Institute of Neuroscience and Medicine (INM-6) Computational and Systems Neuroscience Jülich Research Centre Jülich, Germany http://www.csn.fz-juelich.de
Email: j.mitchell@fz-juelich.demailto:j.mitchell@fz-juelich.de Building 15.9 Rm 2001b Phone: +49 2461 61 85457
------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------ Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Volker Rieke Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt, Prof. Dr. Sebastian M. Schmidt ------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------
Hello Jessica,
thank you very much for your response! With your recipe, I could eventually make it work at least on one of my two machines. On the other one, a Macbook with OS 10.14.5 installed, Python will crash after importing Nest in Spyder. When executing another python file, Spyder reloads hundreds of modules before generating the output. Could it be, that I somehow corrupted my Python build in the process of installing Nest? Could I try a workaround to prevent this?
Thank you for your time, best regards, Michael
Hello Michael,
What exactly means:
Python will crash after importing Nest in Spyder
Is there an error message that could help to find the issue?
Here are some possible solutions for problems with Spyder and conda packages and environments: https://github.com/spyder-ide/spyder/wiki/Working-with-packages-and-environm...
I hope this helps.
Best
Steffen
Hello Steffen,
thank you for your response. Yes, I receive a Mac OS crash report for python when I import nest, under this link you find a text file with the output of the crash report:
https://www.dropbox.com/s/3g8g4kr24d5ivha/nest%20import%20-%20python%20crash...
I hope this contains any clue to solve the issue.
Best regards, Michael
Hi Michael
Could you maybe test the NEST conda-package without Spyder? Activate your NEST environment and try to import NEST:
conda activate YOURNESTENVIRONMENT
python
>>>import NEST
If this still causes problems, you could try 'pythonw' instead of 'python'.
Best
Steffen
Am 05.06.19 um 10:02 schrieb gerlach.mi@gmx.de:
Hello Steffen,
thank you for your response. Yes, I receive a Mac OS crash report for python when I import nest, under this link you find a text file with the output of the crash report:
https://www.dropbox.com/s/3g8g4kr24d5ivha/nest%20import%20-%20python%20crash...
I hope this contains any clue to solve the issue.
Best regards, Michael _______________________________________________ NEST Users mailing list -- users@nest-simulator.org To unsubscribe send an email to users-leave@nest-simulator.org