After tensorflow is installed, an error occurred during import: importerror: DLL load failed: the specified module cannot be found

(author: Chen Yao)
share a friend’s AI tutorial. Zero base! Easy to understand! Funny! And yellow jokes! You can see if it helps you http://www.captainbed.net/luanpeng

Tensorflow can be installed through pip or anaconda, but after installation, it can be run in Python script

import tensorflow as tf

Error: importerror: DLL load failed: unable to find the specified module.

Three solutions are tried

1) In addition to tensorflow, we need to install tensorflow GPU

Later I learned that the installation of tensorflow GPU is mainly for acceleration, and this problem has not been solved after the installation.

2) Second, unloading and reloading

Therefore, we upgraded pip, uninstalled it through PIP install tensorflow and then re installed it through PIP install tensorflow , which still can't solve the problem.

3) Third, we need to update pilot

Pilot is an image processing library in Python, which comes with anaconda. But maybe because of the older version of pilot, it needs to be updated.

conda uninstall pillow
conda update pip
pip install pillow

Through the above three lines of commands, first uninstall the pilot in anaconda, then update the PIP, and then install the latest pilot through the upgraded pip. The problem is solved. Hehe, it's also amazing. I don't know why the python package conflicts with tensorflow.... However, when installing, most of the strange problems are version problems. You can only check the version more, but most of the time it's upgrade, sometimes it's a headache to downgrade.

reference material:

https://blog.csdn.net/blueheart20/article/details/79612985

Similar Posts: