imshow no window on Mac Big Sur with Python [closed]

asked 2020-12-02 03:30:41 -0600

maw gravatar image

Ive recently upgraded to Big Sur, and also Python 3.9. and opencv 4.4.0.46 (latest) Now my imshow does not show anything. I can see the python launcher running, but no window appears.

I am currently experimenting with installing an older version. I had some success with 4.4.0.40 and im now trying 4.4.0.44

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by maw
close date 2020-12-03 02:23:14.831986

Comments

and opencv 4.4.0.46 (latest)

no, not latest (which would be 4.5.0)

but it's probably the latest from pip which seemed to have some flaws there.

please at least add the resp. part of your code to your question, so we can check if it's not that

berak gravatar imageberak ( 2020-12-02 04:12:07 -0600 )edit
1

4.5 isnt avaiable yet for Python. But ive gone to 4.4.0.44 and that works, so something is off in the latest python build. Ill wait and see when the next release happens and go from there. Perhaps we will have 4.5 soon.

My code is like 4 lines :) and is def working now with .44

img = cv2.imread("face2.jpg")
img = cv2.resize(img, (100, 100))
cv2.imshow(mat=img, winname="tt")
cv2.waitKey()
cv2.destroyAllWindows()
maw gravatar imagemaw ( 2020-12-02 07:06:06 -0600 )edit

Here is link for MAC OpenCV 4.5.1

supra56 gravatar imagesupra56 ( 2020-12-02 08:00:18 -0600 )edit

OpenCV 4.5.0 is available on python

supra56 gravatar imagesupra56 ( 2020-12-02 08:05:36 -0600 )edit

so something is off in the latest python build.

again, that is specific to the way the pip thing is built (conflicting qt versions), not really an opencv problem (they don't maintain any python bninaries)

berak gravatar imageberak ( 2020-12-02 08:18:31 -0600 )edit

Sorry @berak. Big Sur is latest advanced desktop operating system in the world. Will have to wait.

supra56 gravatar imagesupra56 ( 2020-12-02 08:23:32 -0600 )edit

you are going to need to contact the maintainer of that python package, skvarg. he will need to figure out what's going on, whether it's a build issue or a bug in OpenCV. for a link to an issue (and the github repo of the package), see berak's first comment.

crackwitz gravatar imagecrackwitz ( 2020-12-02 14:24:31 -0600 )edit