Protobuf: Issue with protobuf 3.6.1 with tensorflow 1.10

Created on 19 Aug 2018  路  4Comments  路  Source: protocolbuffers/protobuf

Version: master/v3.6.1
Language: Python 3.6x64 on Windows 10

Steps to reproduce the behavior:
**Followed instructions mentioned on tensorflow.org's guide on installing tensorflow on Windows
(www.tensorflow.org/install/install_windows)

  1. Installed CUDA 9.0 (latest release supported by tf_gpu)
  2. Installed cuDNN v7 for (CUDA 9.0)
  3. Installed tensorflow_gpu using native-pip
    **protobuf is part of tf gpu installation
  4. After the installation, i wanted to test the tf, so as usual tried:
    import tensorflow
    but got an error:==>
    Traceback (most recent call last):
    File "", line 1, in
    import tensorflow
    File "C:\Users\Niraj\AppData\Local\Programs\Python\Python36\libsite-packagestensorflow__init__.py", line 22, in
    from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
    File "C:\Users\Niraj\AppData\Local\Programs\Python\Python36\libsite-packagestensorflow\python__init__.py", line 52, in
    from tensorflow.core.framework.graph_pb2 import *
    File "C:\Users\Niraj\AppData\Local\Programs\Python\Python36\libsite-packagestensorflowcore\framework\graph_pb2.py", line 6, in
    from google.protobuf import descriptor as _descriptor
    File "C:\Users\Niraj\AppData\Local\Programs\Python\Python36\libsite-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.

Initially i thought the issue was related to CUDA or cdnn itself, but after hours of trial & error with multiple cuda & cudnn version combination, i decided to focus on the library mentioned in the error message itself.
I'm not very new to python extensions so obvious work around for me was to try earlier version of protobuf, so i tried:

pip uninstall protobuf
pip install protobuf==3.6.0

and tada!! tensorflow started working.
I'm still not sure if this was actually caused by protobuf or incorrect installations etc.
My sincere apologies if this issue is unrelated.
Please let me know if you need more details on this issue.

Most helpful comment

thanks man!
pip uninstall protobuf
pip install protobuf==3.6.0
this has worked for me

All 4 comments

Duplicate of #5046. You need to update your python to versions >= 3.6.1.

thanks man!
pip uninstall protobuf
pip install protobuf==3.6.0
this has worked for me

Upgrading my python from 3.6.0 to 3.6.1 worked !!!

downgrading protobuf to 3.6.0 worked for me. Thanks!!

Was this page helpful?
0 / 5 - 0 ratings