【问题标题】:have trouble in installing biopython package在安装 biopython 包时遇到问题
【发布时间】:2011-06-07 19:44:47
【问题描述】:

我使用的是 mac 10.6.7,以及安装了 gcc 4.2 的 xcode 4。 但是当我安装 biopython 时: python setup.py 安装 在命令上,它在 gcc 上给出错误:

10-54-41-155-wireless1x:biopython-1.57 xueran2010$ python setup.py install
running install
running build
running build_py
running build_ext
building 'Bio.cpairwise2' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -IBio -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Bio/cpairwise2module.c -o build/temp.macosx-10.6-universal-2.6/Bio/cpairwise2module.o
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler         (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
Bio/cpairwise2module.c:639: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/folders/ir/ir6RCJTKGB4QU5sVdTXwt++++TI/-Tmp-//cccUvTiF.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1

【问题讨论】:

标签: python bioinformatics biopython


【解决方案1】:

我建议你的问题的根源是这一行:

/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed

XCode 4 不喜欢尝试用 PPC 架构编译东西,所以你需要停止尝试:

env ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install

(免责声明:我无法对此进行测试,因为 BioPython 在我的 10.6.7 机器上构建得很好......)

http://biostar.stackexchange.com 提出的任何未来 BioPython 问题,您可能会获得更多乐趣。

【讨论】:

    【解决方案2】:

    安装 biopython 最简单的方法是使用 Anaconda。从 Continuum 网站 (http://continuum.io/downloads) 下载最新版本,安装软件包,然后转到终端并更新 conda 和 anaconda(为了安全起见,您拥有所有新软件包)。所以,这样做:

    conda update conda
    conda update anaconda
    

    然后你就可以安装 biopython 了:

    conda install biopython
    

    就是这样。打开 Anaconda 并启动一个 IPython 笔记本。要查看 biopython 是否有效,请执行以下操作:

    from Bio.Seq import Seq
    my_seq = Seq("AGTACACTGGT")
    my_seq
    

    如果你恢复你的序列,它就可以工作了。

    【讨论】:

      【解决方案3】:

      似乎是 Apple 新版 X Code 的问题,也会影响其他 Python 库,如 NumPy。

      请参阅此线程,其中建议的简单解决方案是卸载 X Code 4,安装 Xcode 3,然后可选择重新安装 XCode 4。

      http://lists.open-bio.org/pipermail/biopython/2011-June/007320.html

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-03-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-06-05
        • 2019-03-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多