Home >Backend Development >Python Tutorial >What should I do if I get an error when importing caffe into python?
The solution to the error when importing caffe into python: first install mkl in the system, the code is [conda remove mkl mkl-service]; then import caffe again, the code is [import caffe].
Solution to the error when importing caffe into python:
Import caffe into python:
import caffe
An error occurred:
Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so.
If MKL is installed on the system, just add the MKL lib path to the environment variable.
If MKL is not installed on the system, the solution is as follows:
conda install nomkl numpy scipy scikit-learn numexpr conda remove mkl mkl-service
Import caffe again:
import caffe
Congratulation! Import successful.
Related learning recommendations: python tutorial
The above is the detailed content of What should I do if I get an error when importing caffe into python?. For more information, please follow other related articles on the PHP Chinese website!