nrngui failed as Py_Initialize exited

Post Reply
figoyouwei
Posts: 41
Joined: Sun Aug 08, 2010 11:09 am

nrngui failed as Py_Initialize exited

Post by figoyouwei »

Dear Ted:

I just successfully installed NEURON with Python on the Mac OSX 10.9.4, everything works perfect under Python(2.7.8), but the nrngui doesn't seem to go and produces this error message, I tried different PYTHONHOMEs after examining that site.__file__, still no good.

Anything else I shall try ? And why is nrngui calling Python anyway ?

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NEURON -- VERSION 7.4 (1135:0069222b746d) 0069222b746d
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2014
See http://www.neuron.yale.edu/neuron/credits

ImportError: No module named site
Py_Initialize exited. PYTHONHOME probably needs to be set correctly.
Our automatic guess based on the Python shared library location:
export PYTHONHOME=/usr
did not work.
It 'may' help to examine the output of:
python
import site
site.__file__

ted
Site Admin
Posts: 5770
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: nrngui failed as Py_Initialize exited

Post by ted »

So you started Python, and at the >>> prompt, you executed

Code: Select all

import site
and then

Code: Select all

site.__file__
When you executed site.__file__ what did Python print?
I tried different PYTHONHOMEs after examining that site.__file__, still no good.
What PYTHONHOME did you try, and how did you try it?

figoyouwei
Posts: 41
Joined: Sun Aug 08, 2010 11:09 am

Re: nrngui failed as Py_Initialize exited

Post by figoyouwei »

site.__file__ prints out
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc'

so I tried:
export PYTHONHOME=/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7

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

Re: nrngui failed as Py_Initialize exited

Post by hines »

site.__file__ prints out
'/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc'
Please try
export PYTHONHOME=/Library/Frameworks/Python.framework/Versions/2.7

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

Re: nrngui failed as Py_Initialize exited

Post by hines »

I should also mention that
nrngui -nopython
will also launch without initializing python. To make that permanent, you can create a $HOME/.nrn.defaults
(note the beginning '.' )file with the line
nopython: on

or you can put the above line in the /Applications/NEURON-7.3/nrn/share/nrn/lib/nrn.defaults
file (notice there in on beginning '.')

figoyouwei
Posts: 41
Joined: Sun Aug 08, 2010 11:09 am

Re: nrngui failed as Py_Initialize exited

Post by figoyouwei »

thank you !

Post Reply