I installed Biopython, but I am unable to get the computer to recognize the modules. For example, I create a text file in Komodo like this:
from Bio.Alphabet import IUPAC
from Bio import Seq
my_prot=Seq.Seq("AGTACACTGGT",IUPAC.protein)
and run it in terminal and receive:
Traceback (most recent call last):
File "bio.py", line 1, in <module>
from Bio.Alphabet import IUPAC
ImportError: No module named Bio.Alphabet
For the record, I can’t get modules to import in interactive mode either. The documentation states that I can append the module search path by exporting to an environmental variable called PYTHONPATH (like with PATH), but when I type ‘env’ into the terminal, I see no environmental variable of the sort. I’m a biologist–not a computer scientist or programmer. Please bear with my naiveté if this sounds like nonsense.
You must find in which directory situated the module that you needs (Bio) and then add the path to the directory to
PYTHONPATH.Instead of
/usr/local/bio-python/you must specify the path that you’ve found.To find the module you must use something like:
That is just an example. Of course it would be better if you could give some additional information (e.g. where you’ve installed the module and so on).