Installing OpenCV for Python on Ubuntu, getting ImportError: No module named cv2.cv

后端 未结 20 920
遥遥无期
遥遥无期 2020-11-28 23:48

I have an Ubuntu 14.04 system, on which I want to install OpenCV and use it with Python 2.x.

I installed OpenCV using the instructions here: https://help.ubuntu.com/

20条回答
  •  萌比男神i
    2020-11-29 00:54

    If you really sure that you installed cv2 but it gives no module error. There is a solution for this. Probably you have cv2.so file in your directory

    /usr/local/lib/python2.7/site-packages/cv2.so
    

    move this cv2.so file to

    /usr/lib/python2.7/site-packages
    

    copy the file into site-packages directory

提交回复
热议问题