biopython no module named Bio

前端 未结 11 1282
夕颜
夕颜 2021-01-17 10:15

FYI: this is NOT a duplicate!

Before running my python code I installed biopython in the cmd prompt:

pip install biopython

I then

11条回答
  •  -上瘾入骨i
    2021-01-17 11:09

    In my case (MacOS X Catalina, python 3.7.6 installed by brew), I had to install it with

    python -m pip install Bio
    

    (uppercase) but use it with

    from bio import pairwise2
    

    and the worse is that I had to change the code of the package: I went into python3.7/site-packages/bio/pairwise2.py, line 246, changed

    from Bio import BiopythonWarning
    

    into

    from bio import BiopythonWarning
    

    I hate changing the code of the package, on the next update it won't work again… Please do something to fix this bio/Bio issue.

提交回复
热议问题