![](/img/trans.png)
[英]Install `numpy` and `scipy` MKL from Anaconda on `pip` Environment
[英]Install Scipy with MKL through PIP
我正在使用PIP安装Scipy和MKL来加速性能。 我的操作系统是Ubuntu 64位。 使用此问题的解决方案,我创建了一个文件.numpy-site.cfg
[mkl]
library_dirs=/opt/intel/composer_xe_2013_sp1/mkl/lib/intel64/
include_dirs=/opt/intel/mkl/include/
mkl_libs=mkl_intel_lp64,mkl_intel_thread,mkl_core,mkl_rt
lapack_libs=
这个文件帮助我成功安装Numpy和MKL。 但是,使用相同的上述文件,安装Scipy会提示错误
ImportError: libmkl_rt.so: cannot open shared object file: No such file or directory
我也用
export LD_LIBRARY_PATH=/opt/intel/composer_xe_2013_sp1/mkl/lib/intel64
但问题仍然是一样的。
有谁知道如何解决这个问题? 我不想手动安装Scipy所以任何人都给我一些提示来解决它。
英特尔一直在发布Numpy,Scipy和Scikit等软件包,并向PyPI学习。 这些轮子是在与英特尔MKL连接时构建的,包括各种优化。
如果你想要使用英特尔MKL构建的Scipy:
#Remove existing Numpy and/or Scipy:
pip uninstall numpy scipy -y
#Install scipy built with Intel MKL:
pip install intel-scipy
我有Win3 64Bit和Python 3.6.2我已经通过http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy安装了scipy
我按照以下步骤:
完成!
问这个问题已经过去了2年。
现在有linux的numpy / scipy轮子使用为avx2编译的openblas,因此你可以在不构建软件包的情况下获得更好的性能。 您可能需要升级pip才能安装它:
pip install --upgrade pip
pip install numpy scipy
如果你想要MKL,那么你可以安装Anaconda或Intel Distribution for Python 。 他们使用conda而不是pip来管理包,但是它们是免费的并且分发包含所有依赖性的包,包括MKL。
如果您在安装或运行特定版本时遇到问题,请先卸载然后再安装
第1步:
pip uninstall -v numpy
第2步:下载wheel文件并安装
pip install -U numpy-1.13.0+mkl-cp36-cp36m-win_amd64.whl
在此示例中,轮盘文件名为“numpy-1.13.0 + mkl-cp36-cp36m-win_amd64.whl”
由于实际问题本身没有得到回答,让我试一试......
我认为这里的问题基本上是使用的BLAS / LAPACK库分布在多个位置,numpy不能很好地处理这个问题。
我们已经在EasyBuild修复了这个问题,我们已经在英特尔MKL上建立了numpy / scipy一段时间了,这个补丁: https : //github.com/hpcugent/easybuild-easyconfigs/blob/master/easybuild/easyconfigs /n/numpy/numpy-1.8.1-mkl.patch
对我来说,MKL通过conda install scipy
附带了Scipy库
@ rscohn2解决方案给了我一个使用包的提示。
作为参考,我的环境包括Ubuntu,Anaconda,Python 3.6,Scipy 1.1和MKL 2018.0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.