1
votes

_caffe.so is present in the caffe/python/caffe folder

Have set the path variable as export PYTHONPATH=/home/itstudent1/caffe/python:$PYTHONPATH.

make pycaffe was also successful.

I am not understanding what else might be the cause for this error. I am able to import caffe in python.

File "/home/itstudent1/MajorProject/densecap-master/lib/tools/../../python/caffe/pycaffe.py", line 13, in from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \ ImportError: No module named _caffe

1
are you running the command inside the caffe root folder? have you set the path in .bashrc? - Eliethesaiyan

1 Answers

1
votes

It seems like you have two versions of caffe:
one in /home/itstudent1/caffe and another in /home/itstudent1/MajorProject/densecap-master.
While the first version is built and compiled, the later is not and your import looks for _caffe.so in the later.