Compiling caffe on El Capitan with anaconda installed opencv

187 views
Skip to first unread message

ppolon

unread,
Jan 7, 2016, 10:00:11 PM1/7/16
to Caffe Users
I searched a bit for compiling caffe on El Capitan with anaconda installed opencv. I need to use both opencv and caffe in python but have a dilemma:

1) When I compile opencv by myself (with libstdc++), caffe is compiled but pycaffe makes python crash with "segmentation fault: 11" also "import cv2" makes python crash with the same segmentation fault. Both segmentation fault seems coming from the opencv.

2) When I use anaconda opencv (which I verified that compiled with libc++), I can "import cv2" safely but can't compile with caffe as conda opencv is linked with "libc++".

I had no problem with Yosemite but after upgrading to El Capitan this arises. Does anyone suffer from this kind of problem?

ppolon

unread,
Jan 17, 2016, 11:38:47 PM1/17/16
to Caffe Users

After wresting with it in a few days, I figured out this - all turns out to be not up-to-date brew and conda packages. you may have a problem to use Caffe in python or python without upgrading brew packages and conda packages.

I had problem with using opencv and caffe with python in upgraded El Capitan; 1) segmentation fault in ipython, 2) can’t compile caffe 3) brew’ed opencv didn’t allow me to compile my opencv C++ projects.


All turns out to be not up-to-date brew and conda packages. When you update the OS, please make sure update brew packages and conda packages too for making sure all things work fine. Especially to use Caffe in ipython, please make sure python and ipython in your conda should be up-to-date and install only one libpng library either in conda or with brew.


Hope it help!

Reply all
Reply to author
Forward
0 new messages