Microsoft Windows [版本 10.0.19041.985]
(c) Microsoft Corporation。保留所有权利。
C:\Users\Tommy>Python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z
C:\Users\Tommy>pip install numpy
Collecting numpy
Using cached numpy-1.20.3-cp39-cp39-win_amd64.whl (13.7 MB)
Installing collected packages: numpy
Successfully installed numpy-1.20.3
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the 'd:\software\python3.9\python.exe -m pip install --upgrade pip' command.
C:\Users\Tommy>pip install opencv-python
Collecting opencv-python
Using cached opencv_python-4.5.2.52-cp39-cp39-win_amd64.whl (34.7 MB)
Requirement already satisfied: numpy>=1.19.3 in d:\software\python3.9\lib\site-packages (from opencv-python) (1.20.3)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.5.2.52
WARNING: You are using pip version 21.1.1; however, version 21.1.2 is available.
You should consider upgrading via the 'd:\software\python3.9\python.exe -m pip install --upgrade pip' command.
C:\Users\Tommy>python.exe -m pip install --upgrade pip
Requirement already satisfied: pip in d:\software\python3.9\lib\site-packages (21.1.1)
Collecting pip
Using cached pip-21.1.2-py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.1.1
Uninstalling pip-21.1.1:
Successfully uninstalled pip-21.1.1
Successfully installed pip-21.1.2
C:\Users\Tommy>pip install numpy
Requirement already satisfied: numpy in d:\software\python3.9\lib\site-packages (1.20.3)
C:\Users\Tommy>pip install opencv-python
Requirement already satisfied: opencv-python in d:\software\python3.9\lib\site-packages (4.5.2.52)
Requirement already satisfied: numpy>=1.19.3 in d:\software\python3.9\lib\site-packages (from opencv-python) (1.20.3)
C:\Users\Tommy>python
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> print(cv2.version)
<module 'cv2.version' from 'D:\\software\\python3.9\\lib\\site-packages\\cv2\\version.py'>
>>>