Reputation: 13
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!
Upvotes: 0
Views: 1257
Reputation: 561
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)
Upvotes: 0
Reputation: 2026
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
Upvotes: 0