0

After installing tensorflow when i import tensorflow getting this error ImportError: DLL load failed while importing _pywrap_tensorflow_internal:A dynamic link library (DLL) initialization routine failed.

Details -----

tf-cpu version 2.2.0 python version 3.8.3

  • Possible duplicate with https://stackoverflow.com/questions/49932993/importerror-dll-load-failed-a-dynamic-link-library-dll-initialization-routin. They say you should install TF version 1.15. – Catalina Chircu Oct 09 '20 at 20:03
  • Can you edit your question to give us some more details about your problem, the error messages, version you are using, your CPU type etc.? – neel g Oct 13 '20 at 13:40
  • There is an ['official' post](https://stackoverflow.com/questions/42011070/on-windows-running-import-tensorflow-generates-no-module-named-pywrap-tenso/51606627) on this issue, in which I had provided a [general solution](https://stackoverflow.com/questions/42011070/on-windows-running-import-tensorflow-generates-no-module-named-pywrap-tenso/51606627#51606627). – GZ0 Oct 16 '20 at 07:43

3 Answers3

2

Are you using conda (or any other package management system)? If so, did you install your tensorflow using conda install tensorFlow or pip install tensorflow?

if you installed it with pip, I recommend you to uninstall it and then install tensroflow from conda. This should solve this.

Amit Sharma
  • 690
  • 8
  • 22
0

you may have an issue with CPU AVX compatibility. Check out this thread at GitHub: https://github.com/tensorflow/tensorflow/issues/39423.

Try installing TF version = 2.3.0. If still fails - I suggest reopening that issue at GH.

Poe Dator
  • 4,535
  • 2
  • 14
  • 35
0

I have tried these steps

pip uninstall tensorflow

and

pip install --user tensorflow --force-reinstall --user
desertnaut
  • 57,590
  • 26
  • 140
  • 166