Python 3.10.0 - 在 Windows 10 x64 操作系统中安装 OpenCV

文章目录

  • 安装 OpenCV
  • 查看 opencv-python、numpy 的版本信息
  • 参考

安装 OpenCV

使用 pip install opencv-python 命令即可安装 OpenCV(第 1 行):

C:\Users\Admin>pip install opencv-python
Collecting opencv-python
  Downloading opencv_python-4.5.5.62-cp36-abi3-win_amd64.whl (35.4 MB)
     |████████████████████████████████| 35.4 MB 1.6 MB/s
Collecting numpy>=1.17.3
  Downloading numpy-1.22.1-cp310-cp310-win_amd64.whl (14.7 MB)
     |████████████████████████████████| 14.7 MB 55 kB/s
Installing collected packages: numpy, opencv-python
Successfully installed numpy-1.22.1 opencv-python-4.5.5.62
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Users\Admin\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.

提示numpyopencv-python 的依赖库。

查看 opencv-python、numpy 的版本信息

进入 Python 解释器:

C:\Users\Admin>python
Python 3.10.0 (tags/v3.10.0:b494f59, Oct  4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

导入 opencv-python 包,并查看其版本信息:

>>> import cv2
>>> cv2.__version__
'4.5.5'

导入 numpy 包,并查看其版本信息:

>>> import numpy
>>> numpy.__version__
'1.22.1'

参考

python如何查看opencv当前版本

你可能感兴趣的:(Python,opencv,python,windows,numpy,opencv-python)