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

后端 未结 20 946
遥遥无期
遥遥无期 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条回答
  •  佛祖请我去吃肉
    2020-11-29 00:46

    Verify if cv2.so did compile, should be placed in: /usr/local/lib/python2.7/site-packages Then export that path like this

    export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
    

    Same as in the answer here

提交回复
热议问题