Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

How to solve No module named google.protobuf.internal #610

Open
ghost opened this issue May 19, 2017 · 4 comments
Open

How to solve No module named google.protobuf.internal #610

ghost opened this issue May 19, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented May 19, 2017

when I run
python -c 'from caffe2.python import core'

Traceback (most recent call last):
File "", line 1, in
File "caffe2/python/core.py", line 11, in
from caffe2.proto import caffe2_pb2
File "caffe2/proto/caffe2_pb2.py", line 6, in
from google.protobuf.internal import enum_type_wrapper
ImportError: No module named google.protobuf.internal

@szbach
Copy link

szbach commented May 22, 2017

do you solve it now? i also got the same error...

@yabinzhangJohn
Copy link

I have encounter the similar problem.
I am using anaconda2, and my problem is that I have installed multiple protobuf (conda install -c distributions libprotobuf=2.5.0, which is used for caffe compilation , and also pip install protobuf, which is 3.3.0 mistakenly installed at first).
So I used pip uninstall protobuf and successfully uninstalled protobuf-3.3.0, then the pycaffe import works.

@himanshuhkr
Copy link

I am too facing this issue. I have both anaconda2 and anaconda3 installed(i know its bad way to have both python version, but i had my own reasons.) I changed the makefile to point to python2 anaconda and installed caffe2. Now I am facing the same issue. Any one can suggest what may be the problem?

@urudus
Copy link

urudus commented Aug 24, 2017

I tried https://stackoverflow.com/questions/37666241/importing-caffe-results-in-importerror-no-module-named-google-protobuf-interna and it helps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants