ImportError: No module named cv2

773 views
Skip to first unread message

Kağan İncetan

unread,
Sep 19, 2017, 6:38:37 AM9/19/17
to Caffe Users
Hi all,

I have managed to install caffe and all test are passed. While building I have seen that the correct version openCV(3.2) is recognized but now I am trying to run an example and getting this error.

Does anyone have any idea ?

Thanks in advance

Regards

Przemek D

unread,
Sep 19, 2017, 6:45:40 AM9/19/17
to Caffe Users
This is not a caffe related problem. It looks like your python interpreter cannot find the OpenCV library. Perhaps you need to explicitly tell it where to find the libs? Searching for the error message you're getting returns plenty of answers.

Kağan İncetan

unread,
Sep 19, 2017, 7:46:57 AM9/19/17
to Caffe Users
Hi Przemek,

Thank you for the reply. I am using default python 2.7 which is located in usr/lib/.. I have checked and seen that there is site-packages folder nor cv2.so anywhere. I am unexperienced user trying to run caffe example.

Helps will be appreciated

Thanks in advance

Regards

19 Eylül 2017 Salı 12:45:40 UTC+2 tarihinde Przemek D yazdı:

Ruby Childs

unread,
Sep 19, 2017, 7:55:38 AM9/19/17
to Caffe Users
I recommend you install OpenCV as instructed by PyImage. This one is specifically for Ubuntu, but you can search PyImage to find any other Operating System. See

http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/

Kağan İncetan

unread,
Sep 19, 2017, 10:28:04 AM9/19/17
to Caffe Users
Thank you for the replies. Problem was solved by re-building openCV.

Regards

19 Eylül 2017 Salı 13:55:38 UTC+2 tarihinde Ruby Childs yazdı:
Reply all
Reply to author
Forward
0 new messages