Hi everyone,
We noticed that submissions failed for few participants with the following error:
e[0me[91m ERROR: Failed building wheel for opencv-python
e[0m Running setup.py clean for opencv-python
Failed to build opencv-python
e[91mERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
Reason
Since
opencv-python
version 4.3.0.*,manylinux1
wheels were replaced bymanylinux2014
wheels. If your pip is too old, it will try to use the new source distribution introduced in 4.3.0.38 to manually build OpenCV because it does not know how to installmanylinux2014
wheels. However, source build will also fail because of too oldpip
because it does not understand build dependencies inpyproject.toml
. To use the newmanylinux2014
pre-built wheels (or to build from source), yourpip
version must be >= 19.3. Please upgradepip
withpip install --upgrade pip
.https://github.com/skvark/opencv-python#frequently-asked-questions
Solutions
Are you using requirements.txt
?
In that case, the quickest solution would be pinning opencv to older version, by opencv-python<4.3
.
Are you using environment.yml
or want to use newer opencv version?
In this case you need to install new version of pip
i.e. >=19.3. Other way can be using py-opencv
conda package instead.
Meanwhile, it is good opportunity to move away from requirements.txt to conda environment for dependency management.
We have added environment.yml
in MineRL starter kit as well, to ease the migration.