Member Site › Forums › PyRosetta › PyRosetta – Build/Install › Fatal Python error: PyThreadState_Get: no current thread running “from rosetta import*”
- This topic has 3 replies, 3 voices, and was last updated 11 years, 11 months ago by Anonymous.
-
AuthorPosts
-
-
January 18, 2013 at 6:04 pm #1499Anonymous
I am trying to make PyRosetta run on an iMac with Mountain Lion.
I have Python 2.7 installed from the official installer in /Library/Frameworks/Python.framework/Versions/2.7/bin/python
and IPhyton installed with easy_install in /Library/Frameworks/Python.framework/Versions/2.7/bin/ipython.Python and IPython work perfectly with other application but when I try PyRosetta something goes wrong and I obtain always the same error:
In [1]: from rosetta import*
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6It should be a problem linked to the PYTHONPATH… is there anyway to make PyRosetta working if PYTHONPAT is not /usr/bin/python?
Have anyone experienced the same problem? -
January 18, 2013 at 6:56 pm #8318Anonymous
According to http://code.activestate.com/lists/python-list/1806/ that error message indicates a dynamical library loading issue – likely conflicts between the native python and the installed python.
Was there any particular reason you downloaded a separate python2.7 version rather than use the default 2.7 installation that comes with Mountain Lion? Uninstalling the additional python version you have installed would likely fix the problem.
Assuming you’re using the regular installs of PyRosetta, and didn’t do any special compilation, the library loading should be handled by the regular environment variables. What do the following commands print in your terminal?
echo $PYTHONPATH
echo $LD_LIBRARY_PATH
echo $DYLD_LIBRARY_PATHAdjusting them may get PyRosetta to work appropriately, although doing so may then break your regular Mac OS programs.
-
January 18, 2013 at 8:30 pm #8320Anonymous
PyRosetta binaries will work only with build-in ‘Apple’ python. Please note that it does not mean that you have to make it system default, just make sure to start PyRosetta with /usr/bin/python. So if you want you can maintain alternative shell setting for different Python versions and use them when you need to run PyRosetta. If you decided to go this way I would recommend to use http://pypi.python.org/pypi/virtualenv package to maintain different python env.
Also, if for some reason you absolutely need to use other version of python (say if you have other packages which you want to use in conjunction with PyRosetta) then the only option will be to recompile PyRosetta and link against your custom Python version.
-
January 19, 2013 at 3:30 pm #8327Anonymous
I see, it is clear now.
I was thinking that it was a PYTHONPATH problem and I was wondering if it could be solved in an easy way by changing the links in PyRosetta without recompiling. I guess I will just go on with the preinstalled Apple Python. I will try it and let you know.Thanks for the explanation!
-
-
AuthorPosts
- You must be logged in to reply to this topic.