macos安装pytorch时。执行下面的命令出现报错:Intel MKL FATAL ERROR Cannot load libmkl_intel_thread.dyli
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing
这个问题是mkl模块引发的,因此执行下面的命令,卸载mkl,并更新相关的其
他模块
conda install nomkl numpy scipy scikit-learn numexpr pandas
conda remove mkl mkl-servicemacos
下面这一段是anaconda官方文档对此的说明,源自https://docs.anaconda.com/mkl-optimizations/
Uninstalling MKL
MKL takes roughly 100MB and some use cases do not need it, so users can opt out of MKL and instead use OpenBLAS for Linux or the native Accelerate Framework for MacOSX. To opt out, run conda install nomkl and then use conda install to install packages that would normally include MKL or depend on packages that include MKL, such as scipy, numpy, and pandas. Conda will install the non-MKL versions of these packages together with their dependencies. If you are using OS X or Linux, have already installed these packages or already installed all of Anaconda, and wish to switch away from MKL, use the command conda install nomkl numpy scipy scikit-learn numexpr followed by conda remove mkl mkl-service.ide
注意:不要使用清华的anaconda源,太旧了。如今官方源已经能够访问了。orm
问题的最后解决是经过官方源从新执行以下命令安装就行了
conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typingip