Package: python-numpy Version: 1:1.8.2-2 Severity: normal Dear Maintainer,
Debian python-numpy packaging adds the following symlinks not contained in upstream: /usr/include/numpy /usr/include/pythonX.Y/numpy Their presence causes the following to fail: $ virtualenv env $ ./env/bin/pip install numpy==1.7.2 $ ./env/bin/pip install scipy nose $ ./env/bin/python -c 'import scipy; scipy.test()' The problem is that some modules are compiled with -I/usr/include/python2.7 -I$PWD/env/lib/python2.7/site-packages/numpy/core/include and so apparently end up picking the Numpy headers from the system-wide python-numpy package, rather than from the older 1.7.2 version in the virtualenv, resulting to binaries incompatible with the version installed in the virtualenv. Typical failure mode is getting "numpy.ufunc has the wrong size, try recompiling" error message. One workaround is 'sudo rm /usr/include/numpy /usr/include/python*/numpy' --- it might be possible to work around this by changing the package setup.py files, by trying to ensure the correct order of the include directories. However, this is something that is needed only on Debian-based systems. Python packages using Numpy in general get the header locations via numpy.distutils --- I would expect there are no Python packages that assume headers are under /usr/include or /usr/include/pythonX.Y/, as this is a Debian-only feature AFAIK. Best regards, Pauli Virtanen PS. It appears some other python packages in Debian also add such symlinks. If this is a Debian Python policy, it might be good to consider the present issue. -- System Information: Debian Release: 8.3 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system) Versions of packages python-numpy depends on: ii libblas3 [libblas.so.3] 1.2.20110419-10 ii libc6 2.19-18+deb8u2 ii libgcc1 1:4.9.2-10 ii libgfortran3 4.9.2-10 ii liblapack3 [liblapack.so.3] 3.5.0-4 ii libopenblas-base [liblapack.so.3] 0.2.12-1 ii libquadmath0 4.9.2-10 ii python 2.7.9-1 pn python2.7:any <none> python-numpy recommends no packages. Versions of packages python-numpy suggests: ii gcc 4:4.9.2-2 ii gfortran 4:4.9.2-2 ii python-dev 2.7.9-1 ii python-nose 1.3.4-1 pn python-numpy-dbg <none> pn python-numpy-doc <none> -- no debconf information