Ubuntu, how to install OpenCV for python3?

前端 未结 8 1868
谎友^
谎友^ 2020-12-13 14:51

I want to install OpenCV for python3 in ubuntu 16.04. Fist I tried running sudo apt-get install python3-opencv which is how I pretty much install all of my pyt

8条回答
  •  温柔的废话
    2020-12-13 15:15

    I found this:

    https://pypi.python.org/pypi/opencv-python

    OpenCV on wheels

    'Unofficial OpenCV packages for Python.'

    Installation was painless for Ubuntu 16.04

    pip3 install opencv-python
    

    Check the installation

    python3
    Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
    [GCC 5.4.0 20160609] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import cv2
    >>> cv2.__version__
    '3.2.0'
    

    Not sure why this wasn't mentioned. Perhaps it is newly available?

提交回复
热议问题