Python3 fails to install caffe in anaconda, and python3caffe
Python and Python3 are both languages.
0x00 import caffe FAILED
The environment is Ubuntu 16 cuda 8.0 NVIDIA 361.77 Anaconda2. Caffe was unavailable yesterday:
>>> import caffeTraceback (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
All kinds of tossing are invalid. After Anaconda is reinstalled, the error disappears,import caffe
Successful.
0x01 import FAILED again after "$ conda install opencv"
After using conda install opencv to install Opencv, the same error message is displayed. The error disappears after uninstallation.
After Conda is installed, the Opencv version is 2.4.10, and the apt version is 2.4.9.1. I tried to install version 2.4.9 from conda, but I need to handle a lot of conflict.
Finally, I had no way to prepare to replace it with Anaconda3. After the environment was set up, it was awkward to run the program, and the various libraries were incompatible. I finally realized that Python and Python3 are completely two languages for the old birds.
0x02 Solution
The temporary solution is to discard anaconda, use apt to install software packages, and use the default Opencv of the system to run successfully.
Attachment: Chinese Python3 tutorial pdf http://www.gooln.com/document/519354.html