Missing “Bio.PDB” module when running “remove_loop_coords.py”

Member Site Forums Rosetta 3 Rosetta 3 – Applications Missing “Bio.PDB” module when running “remove_loop_coords.py”

Viewing 1 reply thread
  • Author
    • #2013

        Dear friends,
        When I tried to run “remove_loop_coords.py”, I was told “ImportError: No module named Bio.PDB”:

        lanselibai@ubuntu:/mnt/hgfs/Downloads$ python ~/Cheng/rosetta_2014.30.57114_bundle/tools/protein_tools/scripts/remove_loop_coords.py 4KMT.loops 4KMT_clean_0001.pdb 4KMT_clean_0001_no_loop.pdb
        Traceback (most recent call last):
        File “/home/lanselibai/Cheng/rosetta_2014.30.57114_bundle/tools/protein_tools/scripts/remove_loop_coords.py”, line 4, in
        import Bio.PDB
        ImportError: No module named Bio.PDB

        However, when I tried to install Bio.PDB:

        lanselibai@ubuntu:/mnt/hgfs/Downloads$ sudo apt-get install Bio.PDB
        [sudo] password for lanselibai:
        Reading package lists… Done
        Building dependency tree
        Reading state information… Done
        E: Unable to locate package Bio.PDB
        E: Couldn’t find any package by regex ‘Bio.PDB’

        It still cannot be installed.

        Can I ask how to solve this? Thank you very much.

        Yours sincerely

      • #10347

          The Bio.PDB module is part of Biopython; see if you can install Biopython via apt-get.

        • #10348

            Hi everyday847,
            Thank you. I tried but I was told

            E: Unable to locate package Biopython

            I also tried biopython, which was the same problem.

            Yours sincerely

          • #10357

              The main website for Biopython is http://biopython.org/wiki/Main_Page which has instructions for manual installation.

              From what I can tell, under Ubuntu the package is actually named “python-biopython”. (For Ubuntu, you can go to http://packages.ubuntu.com/ and use the search tool there to see what Ubuntu’s name of the package which provides the program there.) Other distributions may have alternate names for it.

            • #10369

                Hi R Moretti,
                Thank you. “phthon-biopython” can be successfully installed by using:

                sudo apt-get install python-biopython

                However, I was told “ImportError: No module named rosettautil.protein” when I tried:

                lanselibai@ubuntu:/mnt/hgfs/Downloads$ python ~/Cheng/rosetta_2014.30.57114_bundle/tools/protein_tools/scripts/remove_loop_coords.py clean.loops clean.pdb clean_no_loop.pdb
                Traceback (most recent call last):
                File “/home/lanselibai/Cheng/rosetta_2014.30.57114_bundle/tools/protein_tools/scripts/remove_loop_coords.py”, line 7, in
                from rosettautil.protein import util
                ImportError: No module named rosettautil.protein

                1) I tried to search “rosettautil” on http://packages.ubuntu.com/ , but could not find the package.

                2) It seems that “rosettautil” is in the following directory:

                lanselibai@ubuntu:~/Cheng/rosetta_2014.30.57114_bundle/tools/protein_tools$ ls
                documentation MANIFEST README rosettautil scripts setup.py

                I was assuming I could install “rosettautil” by executing “setup.py”. So I tried:

                lanselibai@ubuntu:~/Cheng/rosetta_2014.30.57114_bundle/tools/protein_tools$ python setup.py build

                But “ImportError: No module named rosettautil.protein” still exists when running “remove_loop_coords.py”

                Thank you very much.

                Yours sincerely

              • #10375

                  I believe you also need to run “python setup.py install” rather than just ” python setup.py build”

                • #10378

                    Hi R Moretti,
                    Thank you. It works for me now after using

                    sudo python setup.py install

                    Yours sincerely

                Viewing 1 reply thread
                • You must be logged in to reply to this topic.