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