Home > Backend Development > Python Tutorial > What should I do if I get an error when importing caffe into python?

What should I do if I get an error when importing caffe into python?

coldplay.xixi
Release: 2020-08-25 09:20:14
Original
2082 people have browsed it

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].

What should I do if I get an error when importing caffe into python?

Solution to the error when importing caffe into python:

Import caffe into python:

import caffe
Copy after login
Copy after login

An error occurred:

Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so.
Copy after login

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
Copy after login

Import caffe again:

import caffe
Copy after login
Copy after login

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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template