Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install opencv-python get stuck when building wheel #8408

Closed
zchrissirhcz opened this issue Aug 11, 2020 · 3 comments
Closed

pip install opencv-python get stuck when building wheel #8408

zchrissirhcz opened this issue Aug 11, 2020 · 3 comments

Comments

@zchrissirhcz
Copy link

Environment

System: Ubuntu16.04
Python version: 3.7.2
pip version: 19.2.2

Reproduce

pip install opencv-python

Output:

Looking in indexes: https://pypi.doubanio.com/simple
Collecting opencv-python
Downloading https://pypi.doubanio.com/packages/a1/d6/8422797e35f8814b1d9842530566a949d9b5850a466321a6c1d5a99055ee/opencv-python-4.3.0.38.tar.gz (88.0MB)
|████████████████████████████████| 88.0MB 917kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.14.5 in /usr/local/python/lib/python3.7/site-packages (from opencv-python) (1.19.1)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (PEP 517) ... /

It takes 10 minutes or more to finish this pip install, while if specify version like pip install opencv-python==4.2.0.34 will finish within 10 seconds.

My question:
why does it take so long time to pip install opencv-python?

@skvark
Copy link

skvark commented Aug 11, 2020

I'm fairly sure that your pip is too old so it doesn't detect the new manylinux2014 packages and starts to build OpenCV from source. Source distribution was added in the latest release. Please upgrade with

pip install --upgrade pip

For more info, please see: opencv/opencv-python#372 (comment)

Edit: To be clear, the install doesn't get stuck. OpenCV build will take almost 10 minutes even on modern 8-core CPUs.

@zchrissirhcz
Copy link
Author

@skvark You're right. Now I update pip by pip install -U pip (19.0.3 => 20.2.1) then pip install opencv-python runs very fast. Thanks.

@farlit
Copy link

farlit commented Jul 6, 2021

@skvark Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants