You are here

Missing "Bio.PDB" module when running ""

7 posts / 0 new
Last post
Missing "Bio.PDB" module when running ""

Dear friends,
When I tried to run "", 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/ 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/", 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

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

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

Mon, 2014-09-29 08:23

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

Mon, 2014-09-29 08:42

The main website for Biopython is 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 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

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/ 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/", line 7, in <module>
from rosettautil.protein import util
ImportError: No module named rosettautil.protein

1) I tried to search "rosettautil" on , 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

I was assuming I could install "rosettautil" by executing "". So I tried:

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

But "ImportError: No module named rosettautil.protein" still exists when running ""

Thank you very much.

Yours sincerely

Tue, 2014-09-30 04:37

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

Tue, 2014-09-30 13:22

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

sudo python install

Yours sincerely

Wed, 2014-10-01 02:13