2

安装了 mac OS 10.6 并安装了 python 版本 2.7 32 位以及 numpy 和 scipy。还有xcode 3.2版,我真的很困惑此时该做什么。我下载了 biopython 1.59 版并尝试在 python 中运行设置代码,但它不会工作。我错过了什么?

当我尝试在空闲状态下运行安装文件时,我收到以下错误消息:

Traceback (most recent call last):
File "/Users/Cliff/Downloads/biopython-1.58/setup.py", line 379, in <module>
'Bio.PopGen': ['SimCoal/data/*.par'],
File   "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line    140, in setup
raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help

error: no commands supplied
4

3 回答 3

3

您需要python setup.py install从 Terminal.app 运行。您应该在 bash、tcsh 等 shell 中,而不是在 Python shell 中。

于 2012-05-26T21:54:17.310 回答
0

该错误表明您没有向安装脚本提供命令。通常的命令是“安装”,所以试试:

python setup.py install

无论如何,正如错误所暗示的那样,您可以使用:

python setup.py --help
于 2012-05-26T21:56:24.193 回答
0

就像一个可能更简单的选择:Biopython 也可以通过 pip 获得:

pip install biopython

或者(甚至更好)通过 bioconda(试试看,很棒):

conda install biopython

为此,只需从此处安装 miniconda(非常简单且不需要管理员权限)。然后按照这些简单的说明添加 bioconda 通道。

奇怪的是 biopython 教程中缺少这两个简单的选项

于 2017-03-28T10:25:39.560 回答