I'm trying to write my own python layer in caffe, and when I try to compile it, I keep getting this import error.
Traceback (most recent call last):
File "/home/username/caffe/layer_example.py", line 3, in <module>
import cv2
ImportError: /home/username/anaconda2/lib/python2.7/site-packages/cv2.so:undefined symbol: _ZN2cv11arrowedLineERNS_3MatENS_6Point_IiEES3_RKNS_7Scalar_IdEEiiid
I've tried to find a solution online, and changed my ~/.bashrc to look like this:
export PYTHONPATH=/home/username/caffe/python:/home/username/anaconda2/lib:$PYTHONPATH
I'm still getting the import error though. Any ideas on what the possible solution might be?
EDIT: Fixed the issue! I uninstalled opencv(2.4.10) on conda, and installed version 2.4.9:
conda install opencv=2.4.9
conda install numpy
That fixed the error for me.