您可以从源代码安装opencv。
按照this链接进行操作。
或者您可能需要使用以下命令升级pip3pip3 install upgrade pip
编辑
为了完整性(万一链接断了),我在这里列出了在Ubuntu上编译和安装OpenCV的步骤(在ubuntu14.04lts上用python3测试)。在
步骤1更新包
^{pr2}$
步骤2安装依赖项sudo apt-get install build-essential cmake git pkg-config # Developer tools required to compile opencv
sudo apt-get install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev # Libraries required to read various image format from disk
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev # Libraries required to read various video formats
sudo apt-get install libgtk2.0-dev # Required by opencv for GUI features
sudo apt-get install libatlas-base-dev gfortran # Packages used by opencv to optimize various functions.
pip3 install upgrade pip
步骤3设置虚拟环境(使用conda)conda create -n opencv-exmaple-env python=3.6
source activate open