You are here

Missing "Bio.PDB" module when running "remove_loop_coords.py"

7 posts / 0 new
Last post
Missing "Bio.PDB" module when running "remove_loop_coords.py"
#1

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 <module>
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
Cheng

Post Situation: 
Mon, 2014-09-29 04:34
lanselibai

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

Mon, 2014-09-29 08:23
everyday847

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
Cheng

Mon, 2014-09-29 08:42
lanselibai

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.

Mon, 2014-09-29 13:09
rmoretti

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 <module>
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
Cheng

Tue, 2014-09-30 04:37
lanselibai

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

Tue, 2014-09-30 13:22
rmoretti

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

sudo python setup.py install

Yours sincerely
Cheng

Wed, 2014-10-01 02:13
lanselibai