I'm trying to install numpy and scipy on python3 using pip3. I want to use MKL, so I've specified as much in ~/.numpy-site.cfg
(as suggested here and here):
[mkl]
library_dirs = /opt/intel/mkl/lib/intel64
include_dirs = /opt/intel/mkl/include
mkl_libs = mkl_rt
lapack_libs =
extra_compile_args = -march=native
I then install numpy (successfully) via
$ sudo pip3 install numpy
However, MKL does not show up in the config!
>>> np.show_config()
...
mkl_info:
NOT AVAILABLE
...
Installing scipy subsequently fails (as expected) with
numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
However, when I install numpy and scipy in a virtualenv on the same machine without changing anything else, MKL is found, and scipy works fine.
My first guess was that sudo was not picking up $HOME
, but sudo echo $HOME
returns my home directory correctly.
What could be going wrong?