简体   繁体   中英

#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:

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.

My GCC version is:

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

How can I successfully install the scikit-bio packages for python?

This problem was previously reported by a user with an i686 machine on the scikit-bio issue tracker. The error occurs while compiling SSW, an external C program that is shipped with scikit-bio. The author of SSW recommended passing -msse2 to the compiler to fix the issue.

A fix was merged into the development branch of scikit-bio to include this flag for i686 machines.

If you are installing a release version of scikit-bio, you can specify this flag via CFLAGS on the command line:

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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