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

Open
zkailinzhang opened this issue Aug 21, 2018 · 1 comment
Open

ImportError: No module named _caffe #40

zkailinzhang opened this issue Aug 21, 2018 · 1 comment

Comments

@zkailinzhang
Copy link

root@63b86f5db157:/workspace/gitzkl/RRPN# python ./tools/rotation_demo.py
Traceback (most recent call last):
File "./tools/rotation_demo.py", line 18, in
from fast_rcnn.test import im_detect
File "/workspace/gitzkl/RRPN/tools/../lib/fast_rcnn/test.py", line 16, in
import caffe
File "/workspace/gitzkl/RRPN/tools/../caffe-fast-rcnn/python/caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File "/workspace/gitzkl/RRPN/tools/../caffe-fast-rcnn/python/caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver,
ImportError: No module named _caffe

但是
但是在该容器下 跑 python
import caffe
正常运行,没有报错,

又重新
/opt/caffe/build/tools/caffe
cd /opt/caffe/build
make pycaffe
编译ok
[100%] Built target pycaffe

但还是
python ./tools/rotation_demo.py,出现上述错误,

环境是docker 建立的 nvidia-docker run -ti bvlc/caffe:gpu caffe --version

@famunir
Copy link

famunir commented Sep 10, 2018

make sure you have done the following:
make -j4 && make pycaffe

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