I installed NEURON 7.4 and it is working fine. But then when I try to run it from MATLAB 2015a using a system call (which I can do just fine in Linux or Windows), I am having trouble. Here's what happens:
Even though I can see it exists at /Applications/NEURON-7.4/nrn/share/nrn/lib/hoc/nrngui.hoc and invoking NEURON from Mac's Terminal works just fine and gives no error. If I define the whole path to the file, I get a Python error (I didn't think I was invoking Python, though I did do the standard Mac install which I guess installs NEURON with Python?):NEURON -- Release 7.4 (1341:2ccabed20677) 2ccabed20677
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2015
See http://www.neuron.yale.edu/neuron/credits
oc>load_file("nrngui.hoc")
nrniv: Couldn't find: nrngui.hoc
near line 1
load_file("nrngui.hoc")
^
0
Here are my current environmental variables (I've tried a lot of combinations of these, but apparently just not the right one):oc>load_file("/Applications/NEURON-7.4/nrn/share/nrn/lib/hoc/nrngui.hoc")
first instance of j
first instance of itmp
first instance of using_cvode_
first instance of movie_frame_dur_
first instance of realtime
first instance of running_
first instance of rtstart
first instance of stdrun_quiet
first instance of screen_update_invl
first instance of tstop
first instance of steps_per_ms
first instance of nstep_steprun
first instance of runStopAt
first instance of runStopIn
first instance of global_ra
first instance of mapped_nrnmainmenu_
first instance of v_init
first instance of n_graph_lists
first instance of i
first instance of eventslow
first instance of eventcount
first instance of cnt
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named neuron
1
And here is a bash script I call when issuing system commands from MATLAB or launching Mac's Terminal:>> disp(getenv('PATH'))
/usr/local/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/Applications/NEURON-7.4/nrn/x86_64/bin:/Applications/NEURON-7.4/nrn/x86_64/bin
>> disp(getenv('PYTHONPATH'))
/System/Library/Frameworks/Python.framework/Versions/2.7/lib
>> disp(getenv('PYTHONHOME'))
/System/Library/Frameworks/Python.framework/Versions/2.7
>> disp(getenv('NEURONHOME'))
/Applications/NEURON-7.4/nrn/x86_64/bin
>> disp(getenv('N'))
/Applications/NEURON-7.4/nrn/x86_64/bin
Code: Select all
export PATH=/usr/local/bin:$PATH:/Applications/NEURON-7.4/nrn/x86_64/bin
export PYTHONPATH=/System/Library/Frameworks/Python.framework/Versions/2.7/lib
export PYTHONHOME=/System/Library/Frameworks/Python.framework/Versions/2.7
export NEURONHOME=/Applications/NEURON-7.4/nrn/x86_64/bin
export N=/Applications/NEURON-7.4/nrn/x86_64/bin