简体   繁体   English

通过pip安装scikit-bio时,#error“SSE2指令集未启用”

[英]#error “SSE2 instruction set not enabled” when installing scikit-bio via pip

I want to install the python library scikit-bio via pip using following command: 我想使用以下命令通过pip安装python库scikit-bio:

sudo pip install scikit-bio

on my system: 在我的系统上:

uname -a
Linux grassgis 3.2.0-69-generic-pae #103-Ubuntu SMP Tue Sep 2 05:15:53 UTC 2014 i686 i686 i386 GNU/Linux

However this causes an error: 但是这会导致错误:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c skbio/alignment/_ssw/_ssw_wrapper.c -o build/temp.linux-i686-2.7/skbio/alignment/_ssw/_ssw_wrapper.o
    In file included from skbio/alignment/_ssw/ssw.h:17:0,
                     from skbio/alignment/_ssw/_ssw_wrapper.c:355:
    /usr/lib/gcc/i686-linux-gnu/4.6/include/emmintrin.h:32:3: error: #error "SSE2 instruction set not enabled"
    /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__multiarray_api.h:1532:1: warning: ‘_import_array’ defined but not used [-Wunused-function]
    /usr/lib/python2.7/dist-packages/numpy/core/include/numpy/__ufunc_api.h:226:1: warning: ‘_import_umath’ defined but not used [-Wunused-function]
    error: command 'gcc' failed with exit status 1

I ran already sudo apt-get update and sudo apt-get upgrade to get the most recent versions of installed software. 我已经运行了sudo apt-get updatesudo apt-get upgrade来获取已安装软件的最新版本。

My GCC version is: 我的GCC版本是:

gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

How can I successfully install the scikit-bio packages for python? 如何成功安装python的scikit-bio软件包?

This problem was previously reported by a user with an i686 machine on the scikit-bio issue tracker. 先前 scikit-bio问题跟踪器上的i686机器用户报告此问题。 The error occurs while compiling SSW, an external C program that is shipped with scikit-bio. 编译SSW时出错,这是一个随scikit-bio一起提供的外部C程序。 The author of SSW recommended passing -msse2 to the compiler to fix the issue. SSW的作者建议将-msse2传递给编译器以解决问题。

A fix was merged into the development branch of scikit-bio to include this flag for i686 machines. 修复程序被合并到scikit-bio的开发分支中,以包含i686计算机的这个标志。

If you are installing a release version of scikit-bio, you can specify this flag via CFLAGS on the command line: 如果要安装scikit-bio的发行版,可以在命令行上通过CFLAGS指定此标志:

CFLAGS=-msse2 pip install scikit-bio

or: 要么:

sudo CFLAGS=-msse2 pip install scikit-bio

Alternatively, scikit-bio's setup.py file can be modified to include '-msse2' in SSW's extra_compile_args . 或者,可以修改scikit-bio的setup.py文件以在SSW的extra_compile_args包含'-msse2'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM