Python installation opencv installation guide (latest in February 2023)

Recently, using the anaconda prompt of anaconda to install opencv has a very annoying problem. The commonly used USTC and Tsinghua mirror stations of our school cannot be used normally. But now the Pypi mirror station of the University of Science and Technology is also redirected to Tsinghua University (sad.

There is no way but to use the mirror station of Alibaba Cloud

The code to install opencv using Alibaba Cloud is as follows:

pip install opencv-contrib-python -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

The latter suffix is ​​because aliyun's mirror station is not a trusted mirror station.

Opencv can be installed normally.

It is said that it takes a lot of effort to install opencv every time. The last time I installed the CUDA version of C++ opencv, I also tried to compile it with cmake for two days before it can be used normally. It is hard work.

If the above does not work, change to the mirror station, maybe the mirror stations of Tsinghua University and University of Science and Technology will be fine again

Douban: http://pypi.douban.com/simple/

Nicole: https://pypi.mirrors.ustc.edu.cn/simple/

Tsinghua: Simple Index

Guess you like

Origin blog.csdn.net/Aaron9489/article/details/129174999