This is a test version of Biostars. For the public version, visit https://www.biostars.org.
cannot import name IUPAC

I have this error when I'm trying to use biopython

Traceback (most recent call last):
  File "/usr/bin/presto/FilterSeq.py", line 18, in <module>
        from Bio.Alphabet import IUPAC
ImportError: : cannot import name IUPAC

and some more like this.

Traceback (most recent call last):
  File "/usr/bin/presto/MaskPrimers.py", line 17, in <module>
    from Bio import pairwise2
ImportError: cannot import name pairwise2

Where is my mistake? Maybe I have to install biopython in some other directory?

Thank you

I ran this commands and I had no problem:

python setup.py build
python setup.py test
sudo python setup.py install
presto software-error biopython iupac

1 answer

Problem solved. I've changed the PYTHONPATH to the current directory of biopython.

Log in to answer this question.