简体   繁体   English

在 miniconda 环境中未找到模块错误 Bio

[英]module not found error Bio in miniconda environment

I installed bio python as我将 bio python 安装为

pip install biopython as well as conda install -c conda-forge biopython . pip install biopython以及conda install -c conda-forge biopython I see in site-packages.我在站点包中看到。 for some reason there is Bio dependency.出于某种原因,存在Bio依赖性。 How do I resolve this dependency?如何解决这种依赖性?

 Type "help", "copyright", "credits" or "license" for more information.
>>> import bio
>>> bio.__version__
'1.75'
>>> from bio import pairwise2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../miniconda/lib/python3.7/site-packages/bio/pairwise2.py", line 246, in <module>
    from Bio import BiopythonWarning
ModuleNotFoundError: No module named 'Bio'
>>> 

Apparently, renaming bio as Bio in sitepackages then it works显然,重命名bio作为Biositepackages那么它的工作原理

Python 3.7.4 (default, Aug 13 2019, 15:17:50) 
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Bio
>>> from Bio import pairwise2
>>> 

I have searched on google how to install biopython using pip in this link .我在谷歌上搜索过如何在这个链接中使用 pip 安装 biopython。

  1. You need to type pip install biopython or pip install biopython --user您需要输入pip install biopythonpip install biopython --user

  2. Then import Bio(it is with B not b)然后导入Bio(是B不是b)

import Bio
print(Bio.__version__) 

I'm sure documentation is always a good start which you can find here .我确信文档总是一个好的开始,你可以在这里找到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM