我已经安装了python-biopython,并成功地在python脚本中使用了以下内容:
import Bio但是它最终停止了工作,现在,即使在卸载和重新安装之后,我也无法成功地使用python2.7x导入。我得到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Bio要求的产出:
apt-缓存策略的输出:
python-biopython:
Installed: 1.63-1
Candidate: 1.63-1
Version table:
*** 1.63-1 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/statusfind $(python -c "import sys;print‘n’..join(sys.path)“) -type d -name‘Bio’的输出:
find: `/home/alex/anaconda/lib/python27.zip': No such file or directory
find: `/home/alex/anaconda/lib/python2.7/lib-old': No such file or directorypython -c的输出"import;print‘\n’..join(sys.path)“似乎没有列出:
/home/alex/anaconda/lib/python27.zip
/home/alex/anaconda/lib/python2.7
/home/alex/anaconda/lib/python2.7/plat-linux2
/home/alex/anaconda/lib/python2.7/lib-tk
/home/alex/anaconda/lib/python2.7/lib-old
/home/alex/anaconda/lib/python2.7/lib-dynload
/home/alex/anaconda/lib/python2.7/site-packages
/home/alex/anaconda/lib/python2.7/site-packages/Sphinx-1.3.1-py2.7.egg
/home/alex/anaconda/lib/python2.7/site-packages/cryptography-0.9.1-py2.7-linux-x86_64.egg
/home/alex/anaconda/lib/python2.7/site-packages/setuptools-18.1-py2.7.eggapt-缓存策略python的输出:
python:
Installed: 2.7.5-5ubuntu3
Candidate: 2.7.5-5ubuntu3
Version table:
*** 2.7.5-5ubuntu3 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status发布于 2015-10-31 01:44:02
我想作为一个评论回答,但我需要一些声誉来写评论。所以我在这里写。
我使用现成的虚拟盒子系统。据我所知,在该系统中,QIIME使用不同的路径设置方法。在".bashrc“文件中,它使用activate.sh,如
source /home/qiime/qiime_software/activate.sh
在activate.sh文件中,您可以找到行
export PYTHONPATH=/home/qiime/.../:/home/qiime/.../:
/usr/local/lib/python2.7/dist-packages/`您应该在路径后面添加":/usr/local/lib/python2.7/dist-packages/“来编辑该文件,并使用以下命令再次执行该文件
source /home/iime/qiime_software/activate.sh
我从你的问题和答案中得到了一个解决办法。谢谢。
https://askubuntu.com/questions/677566
复制相似问题