Closed buemi closed 6 years ago
Try installing libprotobuf-dev
, protobuf-compiler
and python-protobuf
if they are not already installed.
Yes, all the packages are installed, but the error persists.
Ok, if those packages are installed, then your $PYTHONPATH
might not include the path to the module.
locate google/protobuf/internal/__init__
print? echo $PYTHONPATH
print?It's quite strange:
$ echo $PYTHONPATH /home/buemi/home/buemi/Antonio/flownet2/python/caffe/python:/usr/local/lib/python2.7/dist-packages/pip:
There is a double home location in the path! Which is the script where I have to look in order to correct it?
Hm, there is this line in set-env.sh
:
CAFFE_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Maybe this is misbehaving?
But what is the correct caffe path? I found several "caffe" folders:
but noone has a subfolder named "python"
It should be flownet2/python
. The caffe
within that folder is the module loaded by import caffe
in Python.
"import caffe" provides the original error:
_>>> import caffe
Traceback (most recent call last):
File "
Have I to set the protobuf path somewhere?
Depends — what is the location of your protobuf (locate google/protobuf/internal/__init__
)?
It seems to be here: /usr/local/lib/python2.7/dist-packages/google/protobuf/internal/init.py /usr/local/lib/python2.7/dist-packages/google/protobuf/internal/init.pyc
I see. Well, since your $PYTHONPATH
only contains /usr/local/lib/python2.7/dist-packages/pip
, I'd try adding /usr/local/lib/python2.7/dist-packages
to it ;)
It seems I solved by installing protobuf locally. Thanx
Fair enough :grin:
Hi, I receive the following error when I execute the run-flownet script:
_flownet2/python/caffe/proto/caffe_pb2.py", line 6, in
from google.protobuf.internal import enum_typewrapper
ImportError: No module named google.protobuf.internal
Any idea?