I am running Python 3 and have skbio v0.5.5 installed. Following the examples in this tutorial, I am trying to run the import statements for some skbio classes, but am getting errors. For example,
from skbio.alignment import Alignment
results in
ImportError: cannot import name 'Alignment' from 'skbio.alignment'
Also,
from skbio import BiologicalSequence
results in
ImportError: cannot import name 'Alignment' from 'BiologicalSequence'
How do I resolve this?
The
Alignmentclass is from an older version of theskbiolibrary, specifically from before version 0.3.If you would like to use those classes, you would need to install scikit-bio from before that version, by doing something like:
If you're just going through the Introduction to Applied Bioinformatics book, like you mentioned in your comment, it's better to use the latest version of the book instead, which will use the latest version of the scikit-bio library.