Skip to main content

Python installs opencv and reports error ERROR: Could not build wheels for opencv-python, which is required to install pyproj

python3.6 encountered an error when installing opencv. As shown below:

pip install opencv-python error.

Please check the install target is valid and see CMake's output for more information.
----------------------------------------
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects

pip install opencv-python The reason is that the latest version installed using the command is not supported by python3.6. So find a version supported by python3.6. like opencv-python==4.3.0.38.

pip install -i https://pypi.douban.com/simple/ pip install opencv-python==4.3.0.38