-
Notifications
You must be signed in to change notification settings - Fork 895
Qt Error on cv2.imshow - Specific to version 4.2.0.32 #290
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
Comments
Qt version was upgraded from 4 to 5 in the latest update (Qt 4 dependencies were too old and caused major issues during builds). The issue is most likely related to that upgrade. I don't own a Mac so it's quite hard for me to debug the issue. However, I'll try to look into it. |
See: https://forum.qt.io/topic/98816/qt-could-not-find-the-platform-plugin-cocoa Set |
This is with
I made some progress setting There is So, I think the first step is to get |
I am getting a similar error message: export QT_DEBUG_PLUGINS=1
python3 run.py
|
@dlech Yeah, it looks like I don't own a Mac so it would be helpful if you can test if the Qt which is embedded to the wheels can be configured to look for the dylib from the wheel install directory. |
The So if we can make it so that |
I'm pretty sure that won't work because the environment variable must be set outside / before the process. |
It should be fine as long as it is set before we try to use Qt. |
It's not very convenient to require every user to export that environment variable before use. |
Yes. I am suggesting that we do it automatically when the |
I spend quite a few hours last night trying to get this repo to build so I can actually try it out. I never could get it to build with python3, but finally got it to build with python2. So making some progress. |
It's quite hard to do the export because it must be done outside the Python process. You can't just set it with Python because the process has already started and afaik setting env variables during the process does not have any effect. |
Please try this simple example to see that it is in fact possible to modify environment variables after a process starts. It is true that processes cannot modify the environment variables of another process, but the process itself can modify its own environment variables. import os
os.environ['PYTHONINSPECT'] = 'on' It has the same effect as |
Thanks for the clarification, I probably mixed this up with the case where another process needed to modify the environment variables (I was trying to do something like that a few years back with some other project...). Thanks for the PR, I'll have a look at it during next week. |
When will this be fixed? This is a real problem for me |
try degrading opencv-contrib by something like sudo pip install opencv-contrib-python==4.0.0.21 this will help |
@prasadnoolu This has been fixed and released in 4.2.0.34. |
Issue
Calling
cv2.imshow
withopencv-python 4.2.0.32
results in the following error:Solution
I am able to fix the issue by:
4.2.0.32
4.1.2.30
Repoduce
The text was updated successfully, but these errors were encountered: