Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`Building wheel for opencv-python (PEP 517) ... -` runs forever

When I run

!pip install imgaug==0.4.0 

the following is the output

Collecting imgaug==0.4.0   Using cached https://files.pythonhosted.org/packages/66/b1/af3142c4a85cba6da9f4ebb5ff4e21e2616309552caca5e8acefe9840622/imgaug-0.4.0-py2.py3-none-any.whl Requirement already satisfied: Pillow in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from imgaug==0.4.0) (5.4.1) Requirement already satisfied: numpy>=1.15 in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from imgaug==0.4.0) (1.15.4) Collecting Shapely (from imgaug==0.4.0)   Using cached https://files.pythonhosted.org/packages/9d/18/557d4f55453fe00f59807b111cc7b39ce53594e13ada88e16738fb4ff7fb/Shapely-1.7.1-cp36-cp36m-manylinux1_x86_64.whl Requirement already satisfied: six in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from imgaug==0.4.0) (1.12.0) Requirement already satisfied: matplotlib in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from imgaug==0.4.0) (3.0.2) Collecting scikit-image>=0.14.2 (from imgaug==0.4.0)   Using cached https://files.pythonhosted.org/packages/0e/ba/53e1bfbdfd0f94514d71502e3acea494a8b4b57c457adbc333ef386485da/scikit_image-0.17.2-cp36-cp36m-manylinux1_x86_64.whl Requirement already satisfied: imageio in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from imgaug==0.4.0) (2.4.1) Collecting opencv-python (from imgaug==0.4.0)   Using cached https://files.pythonhosted.org/packages/77/f5/49f034f8d109efcf9b7e98fbc051878b83b2f02a1c73f92bbd37f317288e/opencv-python-4.4.0.42.tar.gz   Installing build dependencies ... done   Getting requirements to build wheel ... done     Preparing wheel metadata ... done Requirement already satisfied: scipy in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from imgaug==0.4.0) (1.2.0) Requirement already satisfied: cycler>=0.10 in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from matplotlib->imgaug==0.4.0) (0.10.0) Requirement already satisfied: kiwisolver>=1.0.1 in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from matplotlib->imgaug==0.4.0) (1.0.1) Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from matplotlib->imgaug==0.4.0) (2.3.1) Requirement already satisfied: python-dateutil>=2.1 in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from matplotlib->imgaug==0.4.0) (2.7.5) Collecting tifffile>=2019.7.26 (from scikit-image>=0.14.2->imgaug==0.4.0)   Using cached https://files.pythonhosted.org/packages/3c/13/4f873f6b167c2e77288ce8db1c9f742d1e0e1463644e2df4e3bd3c40a422/tifffile-2020.8.25-py3-none-any.whl Requirement already satisfied: networkx>=2.0 in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from scikit-image>=0.14.2->imgaug==0.4.0) (2.2) Collecting PyWavelets>=1.1.1 (from scikit-image>=0.14.2->imgaug==0.4.0)   Using cached https://files.pythonhosted.org/packages/59/bb/d2b85265ec9fa3c1922210c9393d4cdf7075cc87cce6fe671d7455f80fbc/PyWavelets-1.1.1-cp36-cp36m-manylinux1_x86_64.whl Requirement already satisfied: setuptools in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib->imgaug==0.4.0) (40.8.0) Requirement already satisfied: decorator>=4.3.0 in /opt/conda/envs/Python-3.6/lib/python3.6/site-packages (from networkx>=2.0->scikit-image>=0.14.2->imgaug==0.4.0) (4.3.2) Building wheels for collected packages: opencv-python   Building wheel for opencv-python (PEP 517) ... - 

But the Building wheel for opencv-python (PEP 517) ... - runs forever, how to resolve this problem?

like image 463
william007 Avatar asked Aug 31 '20 11:08

william007


People also ask

How long does it take to build OpenCV-Python?

Whereas Python installation is done with Anaconda. Installing OpenCV from source takes up a lot of time. Depending on your hardware, and the installation configuration, it can take anywhere from 5 minutes up to 2 hours.

Could not build wheels for pandas which use PEP 517 and Cannot be installed directly?

To Solve ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly Error Just update your pip and your error will be solve. pip3 install –upgrade pip. this error solved just after update pip with setuptools wheel just run below command. pip install –upgrade pip setuptools wheel.

How do I download pip using OpenCV?

In order to build opencv-python in an unoptimized debug build, you need to side-step the normal process a bit. Install the packages scikit-build and numpy via pip. Run the command python setup.py bdist_wheel --build-type=Debug . Install the generated wheel file in the dist/ folder with pip install dist/wheelname.whl .

Are there any wheels for ARM architecture in OpenCV-Python?

There are no pre-built wheels for ARM architecture for opencv-python. Due to this, pip will attempt to build the package from sources. This will not succeed, because there is a known issue with the cmake dependency which is needed for the build.

Is there a wheel for OpenCV-Python on Jetson nano?

You are using Jetson Nano which is a arm64 board. There are no pre-built wheels for ARM architecture for opencv-python. Due to this, pip will attempt to build the package from sources. This will not succeed, because there is a known issue with the cmake dependency which is needed for the build.

How do I install OpenCV on NumPy?

If you are using Raspberry pi then use command pip install opencv-python==4.5.3.56 then update numpy using pip install -U numpy and then install package you need to install which has OpenCV dependency. Show activity on this post. Thanks for contributing an answer to Stack Overflow!

Why can't I download OpenCV on Windows?

This error comes because to download it, the package should first build thousands of dependencies for wheels as opencv is a big package. If you uninstall wheels then they don't have to build dependencies.


1 Answers

i had the same problem, everything worked out:

pip install --upgrade pip setuptools wheel 
like image 77
Александр Мориконь Avatar answered Oct 11 '22 12:10

Александр Мориконь