import cv2 module did not find a solution

First open the anaconda port,

conda activate pytorch#“pytorch是我用的虚拟环境命名,换成你们自己的就好了”

Enter the virtual environment

Just download the opencv package, download it with the Tsinghua mirror, the code is as follows:

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

When the running result shows Successfully, the installation is complete

Open pycharm again and no error will be displayed

Guess you like

Origin blog.csdn.net/weixin_53374931/article/details/129612066