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

2024-10-02 10:21:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚刚用their homebrew instructions安装了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

Tags: installpiprunfrompyimport脚本bin

热门问题