程序附带的python脚本似乎找不到程序模块

时间:2015-03-14 15:35:28

标签: python python-2.7 homebrew

我刚刚使用their homebrew instructions安装了Gubbins。一切似乎都很顺利,gubbins现在在/usr/local/Cellar/gubbins/1.1.1/bin/gubbins。我应该能够通过运行他们的脚本run_gubbins.py并给它一个输入文件来使用它。但是我收到以下错误:

>$ /usr/local/Cellar/gubbins/1.1.1/usr/bin/run_gubbins.py test.fasta
Traceback (most recent call last):
  File "/usr/local/Cellar/gubbins/1.1.1/usr/bin/run_gubbins.py", line 25, in <module>
    from gubbins import common
ImportError: No module named gubbins

查看run_gubbins.py脚本,我发现它首先要做的是

import sys
sys.path.append(".")
import argparse
from gubbins import common

那么可能会发生什么?为什么程序包中的脚本无法识别它附带的程序?有什么办法可以解决这个问题吗?非常感谢。

Install homebrew from brew.sh
Open a terminal and enter these commands
curl https://bootstrap.pypa.io/ez_setup.py | python - --user
export PATH=~/Library/Python/2.7/bin:${PATH}
easy_install pip
pip install --user dendropy
pip install --user biopython
pip install --user reportlab
brew tap homebrew/science
brew install http://sanger-pathogens.github.io/gubbins/fastml.rb
brew install http://sanger-pathogens.github.io/gubbins/gubbins.rb

0 个答案:

没有答案