python - Biopython - 关于如何安装的非常基本的问题
问题描述
我正在尝试安装 Biopython,但遇到了一些麻烦。我已经在自述文件、PDF 手册和其他人的问题中寻找答案,但他们专注于更高级的问题,而我仍然停留在 0 级。
我是一个完整的n00b,所以请多多包涵。我已经下载了 python3 并将其安装在我的 Mac 上。
python3 --version
Python 3.7.3
pip3 --version
pip 19.2.3 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8)
然后我去下载 biopython-1.77.tar.gz 并在我的桌面上解压缩。
从 biopython-1.77 文件夹中,我做到了
python3 setup.py build
我认为工作正常(屏幕上的东西移动了)。紧随其后的是
sudo python3 setup.py install
同样,我认为这也有效。
现在,为了测试安装是否有效以及我是否准备好使用 Biopython,我尝试了
python3
[>>>进口生物
但我得到了错误:
/Users/user/Desktop/biopython-1.77/Bio/__init__.py:126: BiopythonWarning: You may be importing Biopython from inside the source tree. This is bad practice and might lead to downstream issues. In particular, you might encounter ImportErrors due to missing compiled C extensions. We recommend that you try running your code from outside the source tree. If you are outside the source tree then you have a setup.py file in an unexpected directory: /Users/user/Desktop/biopython-1.77
BiopythonWarning,
然后我尝试从其他地方执行此操作,并将目录更改为 Python3.8 文件夹并尝试
python3
[>>> import Bio
但我得到了错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Bio'
我也尝试在 biopython-1.77 中指定 Bio 的路径,但我得到一个 SyntaxError: invalid syntax on the first "/" 在路径中。
任何安装 Biopython 的帮助将不胜感激。
解决方案
推荐阅读
- c# - C#如何将类构造函数存储在字典中
- android - 无法在 Android 11(R) 中创建 PDF
- node.js - Facebook:URL 被阻止此重定向失败,因为重定向 URI 未在应用程序的客户端 OAuth 设置中列入白名单
- pivot - 如何重复字段数据另存为数据透视表而不是 JSON 格式?
- linux - Nagios Core Influxdb 未显示 nagios 数据
- c - 在 C 控制台中,在用值填充结构数组时不等待第二个输入吗?
- java - 引用对象的 Spring Boot 验证
- javascript - 每次先添加类js
- r - 将 LaTex \def 添加到 RMarkdown YAML 中的 header_includes
- python - 获取由类的装饰器标记的所有函数