biopython no module named Bio

前端 未结 11 1280
夕颜
夕颜 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条回答
  • 2021-01-17 10:58

    In my case, i got an error while trying to install BioPython, "BioPython requires python version greater than 3.6"

    So installing the latest version fixed it for me.

    0 讨论(0)
  • 2021-01-17 11:00

    use this:

    pip3 install biopython

    and then import Bio worked for me

    0 讨论(0)
  • 2021-01-17 11:00

    pip3didn't fully work for me as there was a problem with importing a function.

    conda install biopython 
    

    ✔️ worked for me.

    0 讨论(0)
  • 2021-01-17 11:05

    Rename the site-package name from bio into Bio

    C:\Users\user\Anaconda3\Lib\site-packages\bio
    
    C:\Users\user\Anaconda3\Lib\site-packages\Bio
    

    it works for me!

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题