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 #949

Open taomrzhang opened 6 years ago

taomrzhang commented 6 years ago

Traceback (most recent call last): File "examples/ssd/ssd_pascal.py", line 2, in import caffe ImportError: No module named caffe hello, when I run the 'sudo python examples/ssd/ssd_pascal.py', I met that error, how can I solve it? thank you. when I run the 'sudo make runtest -j16', is ok ,and passed all the test, but when I run the 'make runtest -j16', I met an error.

fraukej commented 6 years ago

@taomrzhang Did you make pycaffe? Also, you need to add $CAFFE_ROOT/python to your pythonpath

taomrzhang commented 6 years ago

@taomrzhang Did you make pycaffe? Also, you need to add $CAFFE_ROOT/python to your pythonpath

yes, when I make pycaffe, I was told that 'make: Nothing to be done for 'pycaffe' '. and I sudo gedit ~/.bashrc and added 'export PYTHONPATH=/home/xxx/caffe/python:$PYTHONPATH'' into it, but I met that error again. How can I solve it? thank you.

fraukej commented 6 years ago

@taomrzhang Did you source ~/.bashrc? Also, are you using python2 or python3?

taomrzhang commented 6 years ago

@taomrzhang Did you source ~/.bashrc? Also, are you using python2 or python3?

yeah, I have done it. I am using python2+. How can I solve it? thank you.