我在Windows 10上使用Spyder(Python 3.7),并且尝试安装biopython:
pip3 install biopython
Requirement already satisfied: biopython in c:\users\iddow\appdata\local\programs\python\python36-32\lib\site-packages (1.73)
Requirement already satisfied: numpy in c:\users\iddow\appdata\local\programs\python\python36-32\lib\site-packages (from biopython) (1.16.4)
所以我知道我有包裹。 在我的python脚本中,我确保此目录位于路径中:
import sys
sys.path.append('C:\\users\\iddow\\appdata\\local\\programs\\python\\python36-32\\lib\\site-packages\\')
现在,当我导入bio时,它可以工作,但是我需要的东西都没有(从ipython控制台粘贴):
import Bio #this works
Bio.seq #now this is just to see if seq exists
Traceback (most recent call last):
File "<ipython-input-40-b958851f4152>", line 1, in <module>
bio.seq
AttributeError: module 'bio' has no attribute 'seq'
任何想法在这里发生了什么? 谢谢...