OpenCV-Python教程:模块安装

原文链接:http://www.juzicode.com/opencv-python-env-install

返回Opencv-Python教程

可以使用pip安装opencv-python,注意安装模块名称是:“opencv-python”

pip install opencv-python

import导入模块的名称为“cv2”,检查安装的opencv-python版本判断是否安装完成:

Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> print(cv2.__version__)
4.5.2
>>>

opencv-contrib-python安装:

pip install opencv-contrib-python

contrib包仍使用import cv2导入。

返回Opencv-Python教程

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注