3

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?

Johannes
  • 1,024
  • 13
  • 32
  • Related: http://stackoverflow.com/questions/16410149/error-sse2-instruction-set-not-enabled-when-including-emmintrin-h – Paul R Oct 06 '14 at 09:04
  • A couple of questions. 1. What machine are you using? If your machine is really old, there is a chance that you machine simply doesn't have SSE2 instructions built in. 2. Exactly what Ubuntu distribution are you using? Are you using Precise? – mortonjt Oct 09 '14 at 03:31

1 Answers1

4

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.

jairideout
  • 661
  • 4
  • 11