Install Questions:
I am using Mac High Sierra (OS10.13.1). Installed X11 (XQuartz), command line tools for Xcode v9, and Anaconda 2.7.
There seems to be an issue with nrngui and nrndemo communicating a python library ("Could not dlopen NRN_PYLIB: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so"). Any thoughts? Thanks for any help!
Python installed correctly:
Adams-MacBook-Pro-2:~ adam$ python
Python 2.7.14 |Anaconda, Inc.| (default, Oct 5 2017, 02:28:52)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import neuron
NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
However,when I open nrngui or a .hoc file...
-e
# PYTHONHOME exists. Do nothing
Attempt to fix nrniv failure using: eval "`mk_nrnpyenv.sh`" failed.
NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
Could not dlopen NRN_PYLIB: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
nrngui exit status was 1
Press return key to exit
Similarly, when I open nrndemo...
-e
# PYTHONHOME exists. Do nothing
Attempt to fix nrniv failure using: eval "`mk_nrnpyenv.sh`" failed.
NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
loading membrane mechanisms from /Applications/NEURON-7.5/nrn/share/nrn/demo/release/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
cabpump.mod cachan1.mod camchan.mod capump.mod invlfire.mod khhchan.mod mcna.mod nacaex.mod nachan.mod release.mod
Could not dlopen NRN_PYLIB: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
neurondemo exit status was 1
Press return key to exit
Install on Mac High Sierra
Re: Install on Mac High Sierra
I can't actually get Neuron to compile on High Sierra. Did you upgrade your existing installation (and not rebuild Neuron) or is it a fresh install?
The problem I am getting is with the include line in src/nrnpython/grids.h, which looks like it is meant to be commented
giving
is in so it appears this line is unnecessary in any case.
The problem I am getting is with the include line
Code: Select all
#include <Python/Python.h>
Code: Select all
/******************************************************************
Author: Austin Lachance
Date: 10/28/16
Description: Header File for grids.c. Allows access to Grid_node
and Flux_pair structs and their respective functions
******************************************************************/
#include <stdio.h>
#include <assert.h>
#if 0 && defined(__APPLE__)
#include <Python/Python.h>
#else
#include <Python.h>
#endif
Code: Select all
libtool: compile: mpicc -DHAVE_CONFIG_H -I. -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/nrnpython -I../.. -I../../src/nrnoc -I../../src/oc -I../../src/parallel -I../../src/nrnjava -I../../src/nrncvode -I../../src/ivos -I../../src/sundials -DOOP=1 -DCABLE=1 -DUSECVODE=1 -DUSEMATRIX=1 -DUSEBBS=1 -I. -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/nrniv -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/ivoc -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/nrnoc -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/oc -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/nrnmpi -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/gnu -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/ivos -I/usr/X11/include -g -O2 -MT grids.lo -MD -MP -MF .deps/grids.Tpo -c /Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/nrnpython/grids.c -fno-common -DPIC -o .libs/grids.o
In file included from /Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/nrnpython/grids.c:9:
/Users/tclose/.pype9/prereq-build/nrn-7.5/python2/nrn-7.5/src/nrnpython/grids.h:10:10: fatal error: 'Python/Python.h' file not found
#include <Python/Python.h>
Code: Select all
Python.h
Code: Select all
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
Re: Install on Mac High Sierra
Just to confirm that removing the #include Python/Python.h lines from grids.h, grids.c, rxd.c and rxd_vol.c fixes the problem I had with the compile.
A separate issue I ran into during make install was
but adding the following in a new file at src/nrnpython/setup.cfg
fixes it.
A separate issue I ran into during make install was
Code: Select all
/Library/Developer/CommandLineTools/usr/bin/make install-exec-hook
echo "enter install-exec-hook in nrn/Makefile.am"
enter install-exec-hook in nrn/Makefile.am
if test "--home=/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7" != "no" ; then \
cd src/nrnpython ; \
/usr/local/bin/python2 setup.py install --home=/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7 ;\
fi
running install
error: must supply either home or prefix/exec-prefix -- not both
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1
Code: Select all
[install]
prefix=
Re: Install on Mac High Sierra
This is a first time install. I am unable to import mayavi?
Python 2.7.14 |Anaconda, Inc.| (default, Oct 5 2017, 02:28:52)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> import matplotlib
>>> import mayavi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mayavi
>>> ^D
$ conda install mayavi
Traceback (most recent call last):
File "/Users/adam/anaconda2/bin/conda", line 7, in <module>
from conda.cli import main
ImportError: No module named conda.cli
Python 2.7.14 |Anaconda, Inc.| (default, Oct 5 2017, 02:28:52)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy
>>> import matplotlib
>>> import mayavi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mayavi
>>> ^D
$ conda install mayavi
Traceback (most recent call last):
File "/Users/adam/anaconda2/bin/conda", line 7, in <module>
from conda.cli import main
ImportError: No module named conda.cli
Re: Install on Mac High Sierra
The problem with NRN_PYLIB is fixed with a new version of nrnpyenv.sh. The difference between new and old is
https://github.com/nrnhines/nrn/commit/ ... d678c72b4d
You can get the new file from
https://github.com/nrnhines/nrn/blob/ma ... rnpyenv.sh
and use it to replace the file in /Applications/NEURON-7.5/nrn/x86_64/bin/nrnpyenv.sh
Also you may wish to update $HOME/.bash_profile by changing the value of NRN_PYLIB
There is a new pkg file with this change at
https://neuron.yale.edu/ftp/neuron/vers ... 64-osx.pkg
https://github.com/nrnhines/nrn/commit/ ... d678c72b4d
You can get the new file from
https://github.com/nrnhines/nrn/blob/ma ... rnpyenv.sh
and use it to replace the file in /Applications/NEURON-7.5/nrn/x86_64/bin/nrnpyenv.sh
Also you may wish to update $HOME/.bash_profile by changing the value of NRN_PYLIB
There is a new pkg file with this change at
https://neuron.yale.edu/ftp/neuron/vers ... 64-osx.pkg