Member Site › Forums › PyRosetta › PyRosetta – Build/Install › Import error undefined symbol and Anaconda python
- This topic has 6 replies, 2 voices, and was last updated 7 years, 1 month ago by Anonymous.
-
AuthorPosts
-
-
November 7, 2017 at 6:49 pm #2777Anonymous
I have a few questions regarding Pyrosetta 4:
First I have Anaconda2 which comes with python installed at /home/MYUSERNAME/anaconda2/bin/python, however the installation uses the default python at /usr/bin/python and its site packages directory in /usr/lib/python2.7/site-packages.
1) How can I uninstall pyrosetta?
2) How can I install it for the Anaconda python?
Second, running native python, trying >>> from rosetta import * gives:
__main__:1: UserWarning: Import of ‘rosetta’ as a top-level module is deprecated and may be removed in 2018, import via ‘pyrosetta.rosetta’.
Traceback (most recent call last):
File “<stdin>”, line 1, in <module>
File “rosetta/__init__.py”, line 21, in <module>
import pyrosetta.rosetta
File “pyrosetta/__init__.py”, line 15, in <module>
import pyrosetta.rosetta as rosetta
ImportError: pyrosetta/rosetta.so: undefined symbol: PyInstanceMethod_Type
How can I fix that? Thanks in advance.
-
November 7, 2017 at 11:53 pm #13868Anonymous
The error message looks like Python version mismath. I would suggest to first trying to import rosetta without installing it (just unpack the pacakge and cd into setup dir, then start python -c ‘import pyrosetta; pyrosetta.init()’) to see if versions match.
To uninstall PyRosetta you will need to manually remove egg files, please see https://stackoverflow.com/a/1233282
-
November 8, 2017 at 4:26 pm #13870Anonymous
Thanks for your reply. I did as you said, I got the same error:
[usr1@machine setup]$ python -c ‘import pyrosetta; pyrosetta.init()’
Traceback (most recent call last):
File “<string>”, line 1, in <module>
File “pyrosetta/__init__.py”, line 15, in <module>
import pyrosetta.rosetta as rosetta
ImportError: pyrosetta/rosetta.so: undefined symbol: PyInstanceMethod_Type
I also still need to know how to install pyrosetta for Anaconda’s python, which is my current default python version.
p.s. I also get the same error when I try /usr/bin/python -c ‘import pyrosetta; pyrosetta.init()’
-
-
November 8, 2017 at 4:54 pm #13871Anonymous
To perform install for Anaconda Python you will to do similar steps but use anaconda python excutable instead, like this: <path-to-anaconda-python> setup.py install
It looks liks your default python and PyRosetta build have incompatble versions, which PyRosetta package are using? Also, what is the output of `python –version` on your machine?
-
November 8, 2017 at 6:17 pm #13872Anonymous
/usr/bin/python –version
Python 2.7.5
Anaconda python
Python 2.7.12 :: Anaconda 4.1.1 (64-bit)
Which version of python is compatible with PyRosetta? Can I use Python 3.5?
P.s. on a side note, totally unrelated to my question, PyRosetta can do everything as the original Rosetta commons, except that I can use Python instead of XML, is this statement correct?
-
November 8, 2017 at 6:50 pm #13874Anonymous
Yes, Python-3.5 builds is avalible as well as other builds. Please find full listing here: http://www.pyrosetta.org/dow
> PyRosetta can do everything as the original Rosetta commons, except that I can use Python instead of XML, is this statement correct?
Yes and no: PyRosetta is providing Python bindings to access Rosetta librarys in Python. So technically it can give you access to almost any such functinalities. However PyRosetta does not provide access to Rosetta app code so some Rosetta apps might have extra functionalitys which is not accessible though PyRosetta layer.
-
-
November 8, 2017 at 9:58 pm #13876Anonymous
Thanks a lot. All seems to be working fine now. All my questions were answered. I truly appreciate your help.
With regards to my side question, I was hoping to use PyRosetta for structure determination in cryoEM density. Particularly, I was going through this tutroial here https://faculty.washington.edu/dimaio/files/rosetta_density_tutorial_may17.pdf however it uses XML scripting which I’m not familiar with. Hopefully, I’m on the right track with PyRosetta.
-
-
AuthorPosts
- You must be logged in to reply to this topic.