FYI: this is NOT a duplicate!
Before running my python code I installed biopython in the cmd prompt:
pip install biopython
I then
When I came across this problem I noticed that after I installed biopython using pip install biopython the module directory in the site-packages folder was written with lowercase instead of uppercase letters. All in all, the folder was named bio instead Bio, so I just renamed the folder and everything started to work just fine. I am new to programing so I am aware this isn't the most elegant solution but it worked for me so I hope my answer will be useful to some of you. :)
I could not import biopython when running python on windows.
I tried several solutions by changing the directory names to upper/lower case as https://stackoverflow.com/a/60753930/10884907 and also different way of calling when import using "Bio", "bio", "biopyhton". None was working.
But, It works in linux as simple as in manual guideliens, I did pip3 install biopython
and with import Bio
works!
I had the same error. it turns out
import Bio
works
instead of import biopython !
I tried pip3 install biopython
but it didn't work for me.
But this works! - !pip install biopython
On windows it installs the bio package in a top level directory named bio with lower case b. To fix the problem rename the directory to upper case b, Bio.
Obviously the biopython people don't pay much attention to the win
I just hit this issue with the problem being lower-case bio vs upper-case Bio. Turns out the problem was that it installs differently on python 2 and 3. In Python 2 you do import Bio
, but in python 3 import bio
. If you're hitting this issue it might be for the same reason, and the solution is probably to make sure you use the right name for the Python version you're on.