Install opencv correctly
1. An error occurred
Direct installation error
2. Solutions
1. Check the python version in the current environment: python --version
2. Enter https://www.lfd.uci.edu/~gohlke/pythonlibs/
(you can collect it, there are all kinds of libraries)
3. Ctrl+f to find opencv, or directly pull down to find the corresponding opencv
4. Find the corresponding version of OpenCV (cp311 corresponds to python3.11) and be sure to install it in the site-packages of the required OpenCV virtual environment! ! !
(Mine is in H:\anaconda\envs\tensorflow\Lib\site-packages)
(It’s 100 million points slower, and the network is disconnected in the middle)
5. Win+r, enter the directory of your installation file, use the command pip install opencv_python-4.5.5-cp311-cp311-win_amd64.whl to
install successfully! congratulations!
6. Check whether the installation is successful