我想创建一个在选择这个简单的Python代码上执行的快捷方式。 它只是从库Biopython中运行一个函数。导入python库gedit外部工具时出错
#!/Users/USERNAME/Library/Enthought/Canopy_64bit/User/bin/python
from Bio.Seq import reverse_complement
import sys
print reverse_complement(sys.stdin.read().rstrip())
但我得到这个错误:
ImportError: No module named Bio.Seq
它没有任何意义,我因为如果我从终端
$ /Users/USERNAME/Library/Enthought/Canopy_64bit/User/bin/python
>>> from Bio.Seq import reverse_complement
图书馆是没有任何问题的进口运行。 我做错了什么?我如何告诉gedit在哪里寻找图书馆?
如果最后一条命令前加上'打印sys.executable',您能得到什么? (*运行在终端*,*运行不在终端*) – falsetru
gedit: '/ Users/gioelelamanno/Library/Enthought/Canopy_64bit/User/Resources/Python.app/Contents/MacOS/Python' Terminal: '/ Users/gioelelamanno/Library/Enthought/Canopy_64bit/User/bin/python' – Gioelelm