Ivan Valentini
Ivan Valentini

Reputation: 23

Import tensorflow error: DLL load failed: The specified procedure could not be found

import tensorflow

When i try to import tensorflow and run the code I get this error:

Traceback (most recent call last):
  File "C:/Users/Ivan/PycharmProjects/AI_Numers/script.py", line 1, in <module>
import tensorflow
  File "C:\Users\Ivan\PycharmProjects\AI_Numers\venv\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "C:\Users\Ivan\PycharmProjects\AI_Numers\venv\lib\site-packages\tensorflow\python\__init__.py", line 59, in <module>
from tensorflow.core.framework.graph_pb2 import *
  File "C:\Users\Ivan\PycharmProjects\AI_Numers\venv\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "C:\Users\Ivan\PycharmProjects\AI_Numers\venv\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.`

I am currently using: Python: 3.6.0 Tensorflow: 1.12

I've already looked at this thread, but I could not fix my problem.

Upvotes: 1

Views: 1885

Answers (3)

Brokkoli 71
Brokkoli 71

Reputation: 139

Maybe this or this could help you. Many people had problems caused by DLL load failed. Also tensorflow is providing a list with possible errors

Upvotes: 1

vineagle
vineagle

Reputation: 39

Facing the same issue on my machine after some trials found a solution which worked for me. Steps to solve the issue:

  1. Re-Install Cuda(Till Date Tensorflow only supports Cuda V9.0 so install Cuda9.0 only)
  2. Add Cuda library, bin paths to system variables
  3. Add Cudnn(Any Version is Ohkey) library to Cuda9.0
  4. Restart PC
  5. Install "pip install tensorflow-gpu==1.8"(I tried with higher version also but not supported in my case but 1.8 easily got installed)

Upvotes: 1

EBIN JOSEPH
EBIN JOSEPH

Reputation: 66

It seems some backward compatibility issues on the library called protobuf. You can use this. But I would recommend a fresh install of python 3.6.6 with anaconda or miniconda and use conda to install tensorflow.

Upvotes: 0

Related Questions