Installation problem Neuron

hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Installation problem Neuron

Post by hines »

Please try
nrn-7.6.2-15-gbdf78f2+.x86_64-osx-py-37-36-27.pkg
from
https://neuron.yale.edu/ftp/neuron/versions/alpha/

The icons are non-functional in this version due to the missing launcher program. So you will have to use a terminal window for
nrnivmodl
nrngui
etc.
was2be
Posts: 12
Joined: Wed Sep 26, 2018 3:34 pm

Re: Installation problem Neuron

Post by was2be »

I found "nrn-7.6.2-15-gbdf78f2+.x86_64-osx-py-37-36-27.pkg" in the alpha versions folder, and confirm that it does work with Mojave. Thank you.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Installation problem Neuron

Post by hines »

The icon launch mechanism is fixed with
nrn-7.6.2-18-gcfe5f00.x86_64-osx-py-37-36-27.pkg
in the alpha download folder. So all functionality on high sierra 10.13 exists with Mojave 10.14.
Note that the first launch of an icon may pop up a system request for your permission. Mojave has increased
the security/privacy features with regard to one program sending a message to another program.
tarelli
Posts: 3
Joined: Thu Sep 27, 2018 6:19 am

Re: Installation problem Neuron

Post by tarelli »

I'm also having a similar problem with Mojave. I tried to compile now with the

Code: Select all

-with-readline=no
option but no luck still. Below is the output I get when I run nrniv and the other commands Michael suggested.
Thanks for the help,
Matteo

Code: Select all

matteocantarelli@MacBook-Pro-2  ~/.pyenv/versions/3.7.0/envs/netpynePython37/bin/nrn/x86_64/bin   f5a1284e 7.6.2 ?  ./nrniv                                                                                                                         ✔  11274  16:32:13
dyld: Symbol not found: _PyExc_AttributeError
  Referenced from: /Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libnrnpython.0.dylib
  Expected in: flat namespace
 in /Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libnrnpython.0.dylib
[1]    19951 abort      ./nrniv
 matteocantarelli@MacBook-Pro-2  ~/.pyenv/versions/3.7.0/envs/netpynePython37/bin/nrn/x86_64/bin   f5a1284e 7.6.2 ?                                                                                                                         ABRT(-6) ↵  11275  16:32:23
 matteocantarelli@MacBook-Pro-2  ~/.pyenv/versions/3.7.0/envs/netpynePython37/bin/nrn/x86_64/bin   f5a1284e 7.6.2 ?  otool -L nrniv                                                                                                         ABRT(-6) ↵  11275  16:32:36
nrniv:
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libnrnoc.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libnrniv.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libivoc.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/liboc.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libnrnmpi.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libneuron_gnu.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libscopmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libsparse13.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libsundials.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libmemacs.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libmeschach.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libivos.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libnrnpython.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.200.5)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1555.10.0)
	/Users/matteocantarelli/.pyenv/versions/netpynePython37/bin/nrn/x86_64/lib/libreadline.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)
 matteocantarelli@MacBook-Pro-2  ~/.pyenv/versions/3.7.0/envs/netpynePython37/bin/nrn/x86_64/bin   f5a1284e 7.6.2 ?  ls -l /usr/lib/libedit*                                                                                                         ✔  11276  17:28:04
lrwxr-xr-x  1 root  wheel      15 26 Sep 14:09 /usr/lib/libedit.2.dylib -> libedit.3.dylib
lrwxr-xr-x  1 root  wheel      15 26 Sep 14:09 /usr/lib/libedit.3.0.dylib -> libedit.3.dylib
-rwxr-xr-x  1 root  wheel  308224 21 Sep 05:17 /usr/lib/libedit.3.dylib
lrwxr-xr-x  1 root  wheel      15 26 Sep 14:09 /usr/lib/libedit.dylib -> libedit.3.dylib
 matteocantarelli@MacBook-Pro-2  ~/.pyenv/versions/3.7.0/envs/netpynePython37/bin/nrn/x86_64/bin   f5a1284e 7.6.2 ?  ls -l /usr/lib/libreadline*                                                                                                     ✔  11277  17:28:50
lrwxr-xr-x  1 root  wheel  15 26 Sep 14:09 /usr/lib/libreadline.dylib -> libedit.3.dylib
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Installation problem Neuron

Post by hines »

-with-readline=no
I assume that is just a typo and you used --with-readline=no
Anyway, have you updated the command line tools. And perhaps you can reinstall python3.7.
I build the distribution with python3.7 and do not see this issue.
tarelli
Posts: 3
Joined: Thu Sep 27, 2018 6:19 am

Re: Installation problem Neuron

Post by tarelli »

Yes, it was a typo in the post on the forum. Is there a way to update command line tools? I installed them after the upgrade to Mojave, now software update says everything is up to date,

Code: Select all

xcode-select --install
says command line tools is already installed. Reinstalling Python 3 is a bit drastic but I can try that at some point if there's not a better lead from the output of those commands. Thanks for the help.
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: Installation problem Neuron

Post by hines »

Ok. so there is no problem with command line tools and readline. I think the next diagnostic test is to install a distributed pkg file for NEURON
and see if that works with your python3.7.
Please try
https://neuron.yale.edu/ftp/neuron/vers ... -36-27.pkg

Just curious, was your python3.7 installed prior to the mojave upgrade
buchin
Posts: 2
Joined: Sat Jan 27, 2018 2:20 am

Re: Installation problem Neuron

Post by buchin »

Dear all,

Has the problem with Mac OS Mojave been solved. I have recently updated to Mojave 10.14 from High Sierra and the Neuron stopped working. I have tried to remove old neuron and install Neuron 7.5, 7.4 and 7.6, but none of the versions installed from dmg file worked. I am using Python 2.7 from anaconda package.

Is there a way to solve the current problem with this OS?

Here are the outputs to the commands
"otool -L /Applications/NEURON-7.6/nrn/x86_64/bin/nrniv"

/Applications/NEURON-7.6/nrn/x86_64/lib/libnrnoc.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libnrniv.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libivoc.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/liboc.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libneuron_gnu.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libscopmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libsparse13.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libsundials.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libmemacs.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/nrn/x86_64/lib/libmeschach.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Applications/NEURON-7.6/iv/x86_64/lib/libIVhines.3.dylib (compatibility version 4.0.0, current version 4.3.0)
/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
/usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)


The output of "ls -l /usr/lib/libedit*"
lrwxr-xr-x 1 root wheel 15B Oct 22 11:34 /usr/lib/libedit.2.dylib@ -> libedit.3.dylib
lrwxr-xr-x 1 root wheel 15B Oct 22 11:34 /usr/lib/libedit.3.0.dylib@ -> libedit.3.dylib
-rwxr-xr-x 1 root wheel 301K Sep 20 21:17 /usr/lib/libedit.3.dylib*
lrwxr-xr-x 1 root wheel 15B Oct 22 11:34 /usr/lib/libedit.dylib@ -> libedit.3.dylib

The attempts to open nrngui leads to the following:

dyld: Symbol not found: _rl_event_hook
Referenced from: /Applications/NEURON-7.6/nrn/x86_64/lib/liboc.0.dylib
Expected in: flat namespace
in /Applications/NEURON-7.6/nrn/x86_64/lib/liboc.0.dylib
Abort trap: 6


Looking forward for your help.
Anatoly
buchin
Posts: 2
Joined: Sat Jan 27, 2018 2:20 am

Re: Installation problem Neuron

Post by buchin »

Quick update:

Re: Installation problem Neuron
Post by hines » Wed Oct 10, 2018 6:39 am

After installation of this version of Neuron nrn-7.6.2-18-gcfe5f00.x86_64-osx-py-37-36-27.pkg
it worked!
tarelli
Posts: 3
Joined: Thu Sep 27, 2018 6:19 am

Re: Installation problem Neuron

Post by tarelli »

I reinstalled Python 3.7, no luck same error. I also tried the packaged version which doesn't work with a different error:

Code: Select all

NEURON -- VERSION 7.6.2-18-gcfe5f00 master (cfe5f00) 2018-10-02
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2018
See http://neuron.yale.edu/neuron/credits

ls: /Users/matteocantarelli/.pyenv/shims/../lib/libpython*.dylib: No such file or directory
Could not dlopen NRN_PYLIB: /Users/matteocantarelli/.pyenv/versions/3.7.0/lib/python3.7/lib-dynload/_posixsubprocess.cpython-37m-darwin.so
As a reminder the error I get with the version I compiled from sources is.

Code: Select all

dyld: Symbol not found: _PyExc_AttributeError
  Referenced from: /Users/matteocantarelli/Documents/Development/netpyne-ui/bin/nrn/x86_64/lib/libnrnpython.0.dylib
  Expected in: flat namespace
 in /Users/matteocantarelli/Documents/Development/netpyne-ui/bin/nrn/x86_64/lib/libnrnpython.0.dylib
[1]    29837 abort      ./nrniv
I also tried configuring it disabling rxd but I still get the same. I nuked all previous installs of NEURON and Python and still end up here. Also note that I need it to work within a virtual environment so I really need to be able to get it to work compiling from sources so I can have different versions for different environments, even if the packaged version had worked (which didn't) that would still not be enough. Thanks a lot for the help so far, I'm aware of the effort it takes.
aaronmil
Posts: 35
Joined: Fri Apr 25, 2014 10:54 am

Re: Installation problem Neuron

Post by aaronmil »

Hello all,

I just updated my Mac OS to Mojava (10.14). It broke my NEURON install. Now, trying to re-install from the latest source is running up against problems related to deprecation of libstdc++

I use anaconda python2.7. I have updated the mac command line tools, and have the latest versions of autoconf, automake, and libtool

I'm building parallel NEURON against mpich with the following config:

./configure --prefix=$HOME/neuron/nrn --with-iv=$HOME/neuron/iv --with-nrnpython=$HOME/anaconda2/bin/python \
--with-paranrn --with-mpi --with-readline=no

On make install, I get:

building 'neuron.hoc' extension
mpicc -fno-strict-aliasing -I/Users/milsteina/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I../.././src/oc -I../oc -I../.././src/nrnmpi -I/Users/milsteina/anaconda2/include/python2.7 -c inithoc.cpp -o build/temp.macosx-10.7-x86_64-2.7/inithoc.o
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++
standard library instead [-Wstdlibcxx-not-found]
1 warning generated.
mpic++ -bundle -undefined dynamic_lookup -L/Users/milsteina/anaconda2/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-2.7/inithoc.o -L/Users/milsteina/neuron/nrn/x86_64/lib -L/Users/milsteina/neuron/iv/x86_64/lib -L/Users/milsteina/anaconda2/lib -lnrnpython -lnrnoc -loc -lnrniv -livoc -lmemacs -lmeschach -lneuron_gnu -lnrnmpi -lscopmath -lsparse13 -lsundials -lreadline -lIVhines -o build/lib.macosx-10.7-x86_64-2.7/neuron/hoc.so
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
ld: library not found for -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'mpic++' failed with exit status 1
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

I did take a peek in my /src/mac/Makefile.am to make a change suggested upthread, but I actually don't see the edited line there.
aaronmil
Posts: 35
Joined: Fri Apr 25, 2014 10:54 am

Re: Installation problem Neuron

Post by aaronmil »

FWIW, I was able to get through make install without any errors by first exporting these environment variables:

export CFLAGS='-Qunused-arguments -mmacosx-version-min=10.9 -stdlib=libc++'
export CXXFLAGS='-Qunused-arguments -mmacosx-version-min=10.9 -stdlib=libc++'
export LDFLAGS='-Qunused-arguments -mmacosx-version-min=10.9 -stdlib=libc++'

However, then, when I tried to
import neuron

I got the dreaded:

ImportError Traceback (most recent call last)
<ipython-input-1-861d48cbe3e0> in <module>()
----> 1 import neuron

/Users/milsteina/neuron/nrn/lib/python/neuron/__init__.py in <module>()
110 import neuron.hoc
111 except: # mingw name strategy
--> 112 exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1]))
113
114 import nrn

<string> in <module>()

ImportError: No module named hoc27

I have seen this many times before on various machines, and it is never quite clear how I get past it.

EDIT: I re-installed anaconda python and then installed NEURON with the above trick, and it worked.
NEURON appears to want python to have been compiled with the same verson of gcc/llvm/clang, which changed with OSX 10.14
AGBX2
Posts: 18
Joined: Thu Jun 16, 2011 11:12 am

Re: Installation problem Neuron

Post by AGBX2 »

Dear All,

My NEURON-7.6 has also been broken after the Mojave update. I have removed Anaconda install (both 2.7 and 3.7) removed NEURON and tried to reinstall all but I still have the same error message. Is there a possibility to have the binary distribution of NEURON working or do I have to recompile NEURON after the reinstall of Python ?

Code: Select all

$nrngui
dyld: Symbol not found: _rl_event_hook
  Referenced from: /Applications/NEURON-7.6/nrn/x86_64/lib/liboc.0.dylib
  Expected in: flat namespace
 in /Applications/NEURON-7.6/nrn/x86_64/lib/liboc.0.dylib
Abort trap: 6
Here is my gcc version :

Code: Select all

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Thanks for your help :)
bschneiders
Posts: 34
Joined: Thu Feb 02, 2017 11:30 am

Re: Installation problem Neuron

Post by bschneiders »

Hi all,

I'm getting a similar issue. I updated to Mojave, and got the "ImportError: No module named hoc27" error when I tried to run Neuron again. Per this forum topic, I uninstalled anaconda, deleted Neuron 7.5, and then reinstalled anaconda 2.7 and downloaded Neuron 7.6. I updated Xcode, autoconf, automake and libtools as well. I tried exporting the three environment variables suggested by aaronmil.

When I try to import Neuron again, I get the same error posted before:

Code: Select all

In [1]: import neuron
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-5a1e2e1935ff> in <module>()
----> 1 import neuron

/Applications/NEURON-7.6/nrn/lib/python/neuron/__init__.py in <module>()
    110     import neuron.hoc
    111   except: # mingw name strategy
--> 112     exec("import neuron.hoc%d%d as hoc" % (sys.version_info[0], sys.version_info[1]))
    113 
    114 import nrn

<string> in <module>()

ImportError: No module named hoc27
Any suggestions?
bschneiders
Posts: 34
Joined: Thu Feb 02, 2017 11:30 am

Re: Installation problem Neuron

Post by bschneiders »

I ended up getting mine to work. I did the following:

-added the same 3 flags mentioned by aaronmil to my bash_profile
-deleted Neuron again and built it from source code
-used the configure option --with-readline=no
-did the following step after "make after_install" to make sure python and neuron could talk to each other:

Code: Select all

cd src/nrnpython
python setup.py install
I did not try the alpha version - I think that is why mine was not working when I tried the first time (before using source code).
Post Reply