-
Notifications
You must be signed in to change notification settings - Fork 853
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
IMShow No Window - 4.4.0.46 MacOS Big Sur #423
Comments
Please post the output of |
Same issue here on my end.
|
Thanks, that looks ok. I'm pretty sure this issue has something to do with the Qt version. Qt 5.13.2 ships with current wheels, and based on some fast research, also other projects have had similar issues with it on Big Sur. To fix this problem, Qt needs to be probably upgraded to 5.15. However, 5.15 has another issue that I cannot fix easily because I do not own a Mac. For more information, see #376. I have asked for help on that issue but nobody seems to be interested so don't hold on your breath waiting for a fix. If there isn't enough interest I will probably drop Qt support from the macOS builds because maintaining it is such a PITA. Temporary solution is to use Edit: To add, I have no idea why 4.4.0.40 and 4.4.0.44 work and 46 doesn't. 4.4.0.40 should not be working (at least not on Catalina) unless Apple fixed something in Big Sur. |
I also got this problem, but seemed to have solved it on Mac. I compiled OpenCV 4.5.0 from source and made sure to build the Python binding for Python 3. It was quite a pain to make sure that OpenCV doesn't instead build binding for Python 2.7 that comes with MacOS. Here is how to make sure that a Python 3 binding is built:
Then click "Configure". CMake will fill in many other variables. It will find Python 2, but you should see that it uses Python 3. If it does use the Python 3 you specified, then click "Generate".
These really helped: https://docs.opencv.org/4.5.0/d0/db2/tutorial_macos_install.html The problem seems to be with Qt. With pip's precompiled OpenCV 4.4.0.46, I got an error like this By default, OpenCV is installed into |
@lambdamoses This repository exists to avoid all that manual stuff you did... If you read the manual build section in README, you can do all that with just a few commands: https://github.com/skvark/opencv-python#manual-builds For 4.5.0:
For 4.4.0 which is the latest release in PyPI:
These commands will compile this package from sources. Just make sure you use correct But the easiest way is probably |
I was facing the same issue. @skvark's solution for |
The most recent release (4.5.1.48) drops Qt support on macOS and should fix this issue. If you need Qt support, consider contributing. |
@skvark's solution for 4.5.0 worked for me too! Thank you! |
Tested with OpenCV-Python 4.5.1, works without issues. |
Image window is not appearing in MacOS. MacOS :- Version 13.2.1 (22D68)
|
any update? i still have the same problem.. |
I am also having this issue. |
The same problem on my side, with macOS Monterey 12.1, python 3.9.18 and OpenCV 4.6.0. The imshow() launched a process but no window is showing and I have to manually kill the process. |
Same problem with macOS Monterrey 12.7.3, python 3.10.12 and openCV 4.6.0, any idea? |
here is the possible solution: NOTE: the below snippet works when executed with .py file if you use .ipynb and run it it will crash (idk why is it) x = cv2.imread("data/input/img_0.jpg", cv2.IMREAD_COLOR) while True: if you are trying to read multiple files :
|
Expected behaviour
imshow should open a window
Actual behaviour
python process running but no window shows
Steps to reproduce
def show_image(image):
cv2.imshow(mat=image, winname="tt")
# Wait for a key press to exit
cv2.waitKey()
# Close all windows
cv2.destroyAllWindows()
Mac OS Big Sur 11.0.1
opencv-python 4.4.0.46
Tested with 4.4.0.44 - OK
Tested with 4.4.0.40 - OK
The text was updated successfully, but these errors were encountered: