"import caffe FAILED" after $conda install opencv
I found caffe not work , after install opencv from conda.
>>> import caffe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/duchengyao/project/caffe/python/caffe/__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver
File "/home/duchengyao/project/caffe/python/caffe/pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \
ImportError: /home/duchengyao/project/caffe/python/caffe/../../build/lib/libcaffe.so.1.0.0-rc3: undefined symbol: _ZN2cv8imencodeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11_InputArrayERSt6vectorIhSaIhEERKSB_IiSaIiEE
The version from conda is 2.4.10, but pkg-config is version 2.4.9.1
pkg-config --modversion opencv
2.4.9.1
Simply conda uninstall opencv , caffe works well.
Ubuntu 16 , pyenv+ anaconda2 , Cuda 8 .
Thanks ^_^
It seems it's you're giving it the wrong path. Have you tried looking at Makefile.config? A good way to search for archives is "sudo find / | grep 'your.archive'"
@Caduunb, thanks , Which path do you mean? OpenCV or anaconda?
Regards,
I mean Anaconda's path. Try checking it out and then do all the make's again. If the same problem continues, try with OpenCV. If another problem appears, come here :) P.S.: If it works, please, come here to close the topic and tell how you solved it.
I have the same issue.
Please ask installation questions on the mailing list. If you're having trouble, you might want to try the Caffe Dockerfile to take care of installation for you.
From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:
Please do not post usage, installation, or modeling questions, or other requests for help to Issues. Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.