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