Import error undefined symbol and Anaconda python

Member Site Forums PyRosetta PyRosetta – Build/Install Import error undefined symbol and Anaconda python

Viewing 4 reply threads
  • Author
    Posts
    • #2777
      Anonymous

        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. 

      • #13868
        Anonymous

          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

          • #13870
            Anonymous

              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()’

          • #13871
            Anonymous

              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?

               

            • #13872
              Anonymous

                /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? 

                • #13874
                  Anonymous

                    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.

                • #13876
                  Anonymous

                    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. 

                Viewing 4 reply threads
                • You must be logged in to reply to this topic.