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

Why Building wheel for opencv-python when using "pip install opencv-python" #1009

Open
3 of 4 tasks
laogonggong847 opened this issue Jun 22, 2024 · 0 comments
Open
3 of 4 tasks
Labels

Comments

@laogonggong847
Copy link

System Information

OS: MacOS
opencv: Any version

Detailed description

Hello, Why does Building wheel for opencv-python work when I use "pip install opencv-python"?
Now whether I install the new environment using anaconda or install it again after uninstall opencv in the original environment, I get the steps shown below! This is completely different from my previous pip install, which didn't build before. But I don't have this problem when installing via the ".whl" file. I'm macOS and my first question is: what should I change to make my pip install opencv-python as easy and fast as before without compiling from scratch. It's too slow to compile this way。
1216347367

Meanwhile pip install opencv-python, since it now has to be compiled from scratch, in addition to being a particularly slow installer has a problem that I am very puzzled by. This problem exists both when I compile opencv myself via cmake and when I make opencv-contrib available for C++. Both my own compilation of opencv (for C++) and pip's rebuild of opencv-python have no way to read png files!

C++ builds with cmake and this problem occurs whether I tick "WITH_PNG" or not:
image

It's worth mentioning that my system's libpng version itself is 1.6.39, so why does opencv, which is compiled for C++ with and without "WITH_PNG" checked, have this problem when reading png?
image

Also the previous pip install of opencv was able to read png images correctly with python's opencv since it wasn't compiled from scratch, but now since the install is going to be rebuilt, I'm getting this problem when reading opencv through python.

So my two questions in a nutshell are (1) how do I restore the normal flow of my opencv-python when installed using pip without having to compile from scratch?

(2) How to fix the problem that my own compiled opencv cannot read png images

Looking forward to your answers and help, thank you very much!

Steps to reproduce

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)
@opencv-alalek opencv-alalek transferred this issue from opencv/opencv Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant