Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named _caffe #15

Closed
helxsz opened this issue Jul 15, 2017 · 4 comments
Closed

ImportError: No module named _caffe #15

helxsz opened this issue Jul 15, 2017 · 4 comments

Comments

@helxsz
Copy link

helxsz commented Jul 15, 2017

after the installation, I tried to run the inference_patches.py, an error "ImportError: No module named _caffe" occurred

sys.path.insert(0,CAFFE_ROOT+"/python")
import caffe

I read some other notes with similar problems, which says _caffe.so should be in the /python folder after make pycaffe

I can find the libcaffe.so and libcaffe.so.1.0.0-rc4 in the /caffe/build/lib, but in the /python folder i could find any _caffe.so. to make _caffe.so as suggested by some other, I tried ' make pycaffe ' inside /python folder, but a 'no rule to make target pycaffe ' error occored

@nshaud
Copy link
Owner

nshaud commented Jul 18, 2017

Did you edit the CAFFE_ROOT variable in the config.py file ? It should point to the folder in which you installed Caffe.

@helxsz
Copy link
Author

helxsz commented Jul 19, 2017

I found the problem is related to ubuntu 16.04 but now it works for 14.04. I still don't know what is the problem for 16.04.

@nshaud
Copy link
Owner

nshaud commented Jul 19, 2017

Great ! Do you mind explaining what was the problem and how you solved it in case someone else encounters the same bug ?

@helxsz
Copy link
Author

helxsz commented Jul 22, 2017

Most reason is related to the installation of caffe in 16.04. In 16.04 python 3 and opencv 3.5 is used, therefore can cause the caffe fail to produce the _caffe.so in these cases.

@helxsz helxsz closed this as completed Jul 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants