0
votes

I am new to caffe. I am trying to install it in Ubuntu 14.04 which is running as a dual boot on my macbook pro. I managed to get it running initially but soon after my laptop crashed, following which I have the same error "No module named caffe" I have followed the instructions to the letter and it seems to be an issue with opencv. I get an error message while compiling caffe which I have copied below.

/usr/bin/ld: cannot find -lopencv_imgcodecs collect2: error: ld
returned 1 exit status make: ***
[.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

This leads me to believe there is something wrong with my OpenCV installation? Would really appreciate some help!

2
Looks like some OpenCV dev libs are missing. - Klaus D.
Have you installed the development package for OpenCV? - user707650
Sorry, I didn't follow up on this here. I am very new to SO(I don't use it often as well until recently) and going by my experience on the Caffe mailing list, didn't expect such prompt replies. I was on a time crunch and ended up building caffe on OSX. Thank you for the help though! - Yeshwanth Napolean

2 Answers

0
votes

If you are using anaconda install OpenCV 3 with this:

conda install -c menpo opencv3=3.2.0

Or if you are using homebrew

brew install opencv3
0
votes

Check the installation guide

When compiling with OpenCV 3.0 or errors show imread,imencode,imdecode or VideoCapture open your Makefile with some text editor, add opencv_imgcodecs behind.

LIBRARIES += glog gflags protobuf leveldb snappy \ lmdb boost_system boost_filesystem hdf5_hl hdf5 m \ opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio

(See the discussion at: https://github.com/BVLC/caffe/issues/1276)