cmd中ModuleNotFoundError: No module named ‘cv2’解决办法

输入

pip install opencv-python

输出

D:\>pip install opencv-python
Collecting opencv-python
  Using cached opencv_python-4.6.0.66-cp36-abi3-win_amd64.whl (35.6 MB)
Collecting numpy>=1.19.3
  Using cached numpy-1.23.4-cp310-cp310-win_amd64.whl (14.6 MB)
Installing collected packages: numpy, opencv-python
  WARNING: The script f2py.exe is installed in 'C:\Users\USER\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed numpy-1.23.4 opencv-python-4.6.0.66

[notice] A new release of pip available: 22.2.2 -> 22.3.1
[notice] To update, run: C:\Users\USER\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip

就解决啦!!!

你可能感兴趣的:(python,numpy,开发语言)