4
votes

I installed tensorflow 1.6.0 and protobuf 3.6.0 in my Windows10 using python 3.6.0 and tensorflow imported successfully.

But when I changed my tensorflow version to tensorflow 1.12.0 , python cannot import it.

I run the command

import tensorflow as tf

I got the above result error:

Traceback (most recent call last): File "", line 1, in File "C:\Users\jinu.j\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow__init__.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\jinu.j\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python__init__.py", line 59, in from tensorflow.core.framework.graph_pb2 import * File "C:\Users\jinu.j\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in from google.protobuf import descriptor as _descriptor File "C:\Users\jinu.j\AppData\Local\Programs\Python\Python36\lib\site-packages\google\protobuf\descriptor.py", line 47, in from google.protobuf.pyext import _message ImportError: DLL load failed: The specified procedure could not be found.

the command worked when i used tensorflow 1.6.0. not working in tensorflow 1.12.0

used: python 3.6.0

1
Welcome to StackOverflow! "I installed tensorflow 1.6.0 and protobuf 3.6.0" - can you describe the installation process in your case? Was it pip, pipenv, conda, other?Alex Yu
pip 19.0.3 @AlexYuJinu Joseph
Do you use virtualenv? Can you try pipenv install tensorflow in empty directory and then check pipenv run python -c "import tensorflow"?Alex Yu
yes, I tried, but still the same error. @AlexYuJinu Joseph
Can you include script with fresh pipenv installation, import-test and error message into your original post? E.g. mkdir newdir, cd newdir, pipenv install .. etc?Alex Yu

1 Answers

0
votes

This issue is because of the Package dependency between Tensorflow and Protobuf. Try using Tensorflow 1.14.0

pip install tensorflow==1.14.0