win10 + python + opencv

① Needless to say the installation of python, go to the official website to find a corresponding version (note _amd64), download it, and install it directly. Don't forget to import environment variables. There are many online tutorials.

② After python is downloaded, to install pip, go to the Scripts folder under the python installation path and execute the following command:

     

easy_install.exe pip

③ Then to install wheel, execute the following command:

pip install wheel

If the wheel installation fails, you can update pip (after the failure, the command line will prompt you to update the command) and then install it again. If it still fails, you can go to the Internet to search for solutions.

④ Install numpy

Do not use pip install numpy at this time, because the domestic network is very slow. You must first download the numpy installation file by yourself, the URL is as follows:

numpy download link

After finding the corresponding version and downloading it, put it in the Scripts folder under the python installation path, and then execute the following command on the command line:

pip install your_path(你自己的python安装路径)/Scripts/your_numpy_file_name(你刚下载的numpy文件的名称,如numpy-1.18.1-cp36-cp36m-win_amd64.whl )

Run python, if you can import numpy, the installation is successful.

⑤ Install opencv-python

Same as step ④, don’t be so stupid to download with pip install opencv-python, go to the following website to find the corresponding version:

opencv-python download link

Then, the same as step ④, execute:

pip install your_path(你自己的python安装路径)/Scripts/your_opencv-python_file_name(你刚下载的opencv_python文件的名称,如opencv_python-4.2.0.32-cp36-cp36m-win_amd64.whl  )

Run python, if you can import cv2, it means the installation is successful.

Guess you like

Origin blog.csdn.net/qq_39642978/article/details/104895688