Can anyone help me with this? I am at my wit's end.
I recently got a new computer (mac), and installed Python via Anaconda. I was able to use biopython no problem yesterday with the import statement:
from Bio import SeqIO
However, today I was trying to use a function in the package Phylo. At first I didn't realize it was part of biopython, so I tried:
import phylo
When that didn't work, I tried to install it:
python -m pip install phylo
which of course didn't work. The output of that command was:
Collecting phylo
ERROR: Could not find a version that satisfies the requirement phylo (from versions: none)
ERROR: No matching distribution found for phylo
I then went back into a Python shell and typed:
import Bio
which gave me the error:
ModuleNotFoundError: No module named 'Bio'
Thus, I tried to install biopython using:
python -m pip install Bio
After that, I still got the "No module called 'Bio'" error in the Python shell. I have since tried to install/reinstall biopython in a bunch of different ways, to no avail. Here's what I've tried:
python -m pip install biopython
pip install biopython
pip install biopython --upgrade
pip3 install biopython (didn't work at all)
pip install biopython --user
Except in the case of the pip3 command, which didn't work at all, every installation said it was successful. And yet I STILL can't import Bio. I also can't import it as biopython. The statement:
import bio
did work, but none of the needed packages are included.
Please advise. I really need biopython to work and I'm ready to scream.
Open a terminal and check the python version with
python -V
, if the default python version is 2.7 pip 3 will not work and also check if the Python form Anaconda is set as default in bash profile.I only have python 3 on this computer, so I don't think that's the issue:
In the directory: /Users/alissawilliams/anaconda3/lib/python3.7/site-packages/
all of these are listed: bio bio-0.1.0.dist-info biopython-1.74.dist-info
in case that's any help.
Try
/Users/alissawilliams/anaconda3/bin/pip install --upgrade --force-reinstall biopython
and start a python shell by/Users/alissawilliams/anaconda3/bin/python
.This didn't work either. :( I don't know what happened to my biopython, and I've tried every install command known to man at this point. For what it's worth, I can import other modules, just not biopython (for instance, numpy works fine).