weiliu89 / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
4.77k stars 1.67k forks source link

ImportError: No module named caffe.proto #536

Open tianke0711 opened 7 years ago

tianke0711 commented 7 years ago

I have installed the caffe before , and when I used your model(I didn't install the caffe again in your model): SSD:Single Shot MultiBox Detector, I found there is error when I run my code:

File "/home2/challenge99/zht/cookpad_hiro/aicc2017/data/AICC/../../scripts/create_food_annoset.py", line 7, in from caffe.proto import caffe_pb2 ImportError: No module named caffe.proto Traceback (most recent call last): File "/home2/challenge99/zht/cookpad_hiro/aicc2017/data/AICC/../../scripts/create_food_annoset.py", line 7, in from caffe.proto import caffe_pb2 ImportError: No module named caffe.proto

Could you tell me how to solve it, please Thanks! By the way, I have installed the caffe in the /home2/challenge99/zht/caffe. Should I installed the caffe in the SSD model again. After the caffe is installed in the SSD model, the two version of caffe (/challenge99/caffe, and / SSD/caffe) will be conflicted or the system just used the version caffe(SSD/caffe) when I use the caffe to do other caffe program later.

I may missed some information, please tell me if there is. Thanks!

sujinpeng commented 7 years ago

you should add the the path of your caffe .

tianke0711 commented 7 years ago

how to add it @sujinpeng , thanks!

sujinpeng commented 7 years ago

export PYTHONPATH=$PYTHONPATH:/home/**(您服务器的名字)/caffe/pyhon

tianke0711 commented 7 years ago

thanks @sujinpeng , you mean export PYTHONPATH=$PYTHONPATH:/home2/challenge99/caffe/pyhon?

weiliu89 commented 7 years ago

Should be export PYTHONPATH=/home2/challenge99/caffe/python:$PYTHONPATH

tianke0711 commented 7 years ago

thanks! @weiliu89

jtara1 commented 7 years ago

Note: /home2/challenge99/caffe/ is the path referred to as $CAFFE_ROOT in readme install guide.

So if $CAFFE_ROOT is an env var then export PYTHONPATH=$CAFFE_ROOT/python:$PYTHONPATH should work.

mrainezty commented 6 years ago

hi weiliu89, l have run export PYTHONPATH=$CAFFE_ROOT/python:$PYTHONPATH in Ubuntu 14.04.5,but l still met the problem:no module named caffe.proto

xiazijian commented 6 years ago

我添加了export PYTHONPATH=/home/xwy/caffe/python:$PYTHONPATH 但是错误还是那个,怎么回事呀?我明明source 了