0

Please help as I think I have tried everything. I tried reinstalling anaconda and installing tensorflow through anaconda, but it was an older version. Once I tried updating to 2.2 I am now getting this error. See stack trace below. I have also tried fixing the environmental variable with no luck as well.

Processor: Intel I7 OS: Windows 64 bit


ImportError: DLL load failed: The specified module could not be found. `

Failed to load the native TensorFlow runtime.

Environmental Variable

File Explorer

mark
  • 1
  • ImportError: Traceback (most recent call last): File "C:\Users\owner\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\pywrap_tensorflow.py", line 64, in from tensorflow.python._pywrap_tensorflow_internal import * ImportError: DLL load failed: The specified module could not be found. Failed to load the native TensorFlow runtime. – mark Oct 04 '20 at 02:56
  • Does this answer your question? [“Failed to load native TensorFlow runtime”](https://stackoverflow.com/a/58831949/8890345) The linked question has instructions on how to install the Visual C++ 2015 redistributable and how to enable long paths on Windows. – Nathan Mills Oct 04 '20 at 03:58
  • It appears I can't install gpedit.msc. I am also trying to use anaconda and jupyter notebook as per the tutorial I am following. Is there another way? – mark Oct 04 '20 at 04:21
  • You can enable long paths via the registry https://superuser.com/a/1119948/859490 – Nathan Mills Oct 04 '20 at 04:36
  • I used the "Using the Registry instead at HKLM Level" method and reinstalled anaconda. used pip install tensorflow, tried to import it again on jupyter notebook and got "ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found." – mark Oct 07 '20 at 23:36
  • Also tried using spyder, received the same error – mark Oct 08 '20 at 00:22
  • Did you install the redistributable? – Nathan Mills Oct 08 '20 at 00:27
  • From googling it looks like that is for visual studio, is there another such thing for anaconda? – mark Oct 09 '20 at 22:51
  • I installed gpedit.msc using https://www.youtube.com/watch?v=UA885sqU2lg . And i followed how to enable the long paths using the link you sent and local group policy editor. But still getting the following error. ImportError: DLL load failed while importing _pywrap_tensorflow_internal: The specified module could not be found. – mark Oct 09 '20 at 23:19
  • Please see what i have edited so far here. https://imgur.com/a/TOFPTQ1 – mark Oct 10 '20 at 00:24
  • You can use [Dependencies](https://stackoverflow.com/a/51606222/8890345) tool to find out what DLL you are missing. – Nathan Mills Oct 10 '20 at 02:07
  • How can I be missing something when I've uninstalled/reinstalled 100 times? – mark Oct 10 '20 at 02:29
  • Please try using dependencies tool in the linked answer (download from Releases page of the github repo linked in the answer) to see if your _pywrap_tensorflow_internal.pyd library is missing a DLL. "The specified module could not be found" might mean a missing DLL library. Also do you have CUDA 10 installed and cuDNN? – Nathan Mills Oct 10 '20 at 03:03
  • Finally got it to work by downloading visual studio python ide. THanks for all ytour help nathan – mark Oct 15 '20 at 23:10

0 Answers0