Search code examples
pythontensorflowpipprotocol-buffersprotobuf-c

protobuf successfully installed but cannot import


I installed tensorflow 1.13.1 and protobuf 3.6.1. successfully. But when I tried to import protobuf 3.6.1, an error occurs. I used python 3.6.0

Error is given below:

import protobuf Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'protobuf'

because of this i cannot import tensorflow


Solution

  • As discussed in comments, working with pip to get tensorflow running on this particular system turned out to be complicated. Instead, we went with Anaconda installation:

    conda create -n yourenvname tensorflow
    

    To import protobuf:

    import google.protobuf