ImportError: No module named'tensorflow' appears after installing TensorFlow with Anaconda under Win10

1 Problem description

Why is the installation successful, but there are problems during the test?

Successful installation test import tensorflow still appears: ImportError: No module named'tensorflow'

2  upgrade setuptools

The solution for an article is:

https://stackoverflow.com/questions/42244198/importerror-no-module-named-tensorflow?answertab=votes#tab-top

then:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.

If something went wrong again, then download one: PyHamcrest>=1.9.0

3 Download PyHamcrest

Download link: https://pypi.org/project/PyHamcrest/

Input: pip install PyHamcrest, install this small plug-in

4. Install TensorFlow again

pip install --upgrade --ignore-installed tensorflow

Reinstall TensorFlow.

which is

It may take a while...

Successful installation.

5. Test, import TensorFlow

Found missing, cudart64_101.dll.

Then download a cudart64_101.dll (link: https://www.dll-files.com/cudart64_101.dll.html )

Place the decompressed dll file in the folder: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin.

Then do the following again:

6 thanks

Blue Benben who wants to fly , https://blog.csdn.net/qq_44762986/article/details/104794147

zinkin14https://blog.csdn.net/zinkin14/article/details/79235314

https://stackoverflow.com/questions/42244198/importerror-no-module-named-tensorflow?answertab=votes#tab-top

https://blog.csdn.net/oMoDao1/article/details/81944307

Guess you like

Origin blog.csdn.net/a1456123a/article/details/115250658