Solve ModuleNotFoundError: No module named 'cv2'

Solve ModuleNotFoundError: No module named 'cv2' and fail to install opencv-python numpy==1.13.3

First check the pip list according to the operating environment to see if the opencv-python module is included

pip list

If not, install it (pay attention to the installation environment)

pip3 install --user -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python

If an error is reported in red

Could not find a version that satisfies the requirement numpy==1.13.3 (from versions: 1.14.5, 1.14.6, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0rc1, 1.17.0rc2, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0rc1, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0rc1, 1.19.0rc2, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0rc1, 1.20.0rc2, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0rc1, 1.21.0rc2)
No matching distribution found for numpy==1.13.3

At once

pip install --upgrade pip

Please like to solve the problem

Guess you like

Origin blog.csdn.net/L_W_D_/article/details/118108180