-
Notifications
You must be signed in to change notification settings - Fork 862
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
Could not find the Qt platform plugin "wayland" in opencv path #729
Comments
i also have same problem with latest version of opencv-python.If any one was able to solve this issue please reply here. |
I have the same problem for opencv-python 4.5.x,4.6.x, the error message is
My environments are Any progress in this issue? |
You can try lowering the Python version. |
Hello guys,please I need help about this. I am getting same error here also and its not allowing video stream to continue.
@likehengqq I have also tried decreasing the opencv-python version but its still not working. |
Guys the error shows but it still works. It shows like some kind of warning and it does not prevent my program from running. But when I use ffpyplayer to also read audio the error shows but this time it will not allow my program to run further. Please what is the cause of this strange behavior? |
OpenCV distributes own instance of QT to facilitate imshow and some other UI functions. Own QT built is done without wayland support: https://github.com/opencv/opencv-python/blob/4.x/docker/manylinux2014/Dockerfile_x86_64#L59. I'll take a look if we can add this option to the package for the next release. |
yep similar issue here were you able to figure it out? |
@likehengqq @bengabp @KaranParekh11 Could you try to install experimental package with Qr 5.15.8 and Wayland plugin enabled for build: https://github.com/opencv/opencv-python/actions/runs/4012888768? I need feedback from real Wayland-based system. |
I tested out your provided wheel
edit: I can also confirm that the wheel you built works nicely when I change the session to X11. |
Thanks. I got the same result with Kubuntu 22.04. It looks like I missed something in package. |
Is there any way to silence this message for now in the terminal? |
@mahyarmirrashed yes it is. So there 3 ways I 've proven to work to suppress this message:
In the Thonny IDE commen in no. 1 works fine should in terminal too. |
I am on Wayland and seeing the same result as @vineoak, is there a solution without having to swich to X11? |
Not yet for now. |
disable wayland in ubuntu system go to /etc/gdm3/custom.conf and uncomment the "WaylandEnable=false" Uncomment the line below to force the login screen to use Xorg then restart the PC |
second option worked for me. thanks |
Same issue here, but the code itself is working fine. I've tried @ultimateagain steps and disabled this warning message. Environment: |
@jeroenvermunt, setting |
Try this: import os
os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = "wayland" |
If you're not in conda environment, this solution will work best
this will work best in the current on terminal only. For permanent change do
and restart/logout |
It works! |
A workaround I found was to use |
Could be related, if not the exact same issue, since the problem is with bundled QT: https://bugreports.qt.io/browse/QTBUG-114635 |
The problem is that opencv-python does not come with a library for Wayland so QT_QPA_PLATFORM_PLUGIN_PATH has no value and does not point to any location. Therefore, your method does not solve the problem on systems operating based on Wayland such as Raspberry Pi-5.
There is no Wayland library.
The deeper cause lies in the Dockerfile build operation, which ignored the Wayland build "-skip qtwayland" |
I agree with you. How did you solve it in the end? |
how do i find this command? I have wayland running, but i cant seem to find this binary or package |
Hi to all, Im using ubuntu OS 64 with VSCode, I have created a folder in which a create a virtualenv to run code. Im trying to use cv2 to refresh images, and got this warning: |
Did you try #729 (comment)? sudo apt install xwayland-run |
how do I solve this in the virtualenv? Im using VSCode in this venv and I already tried to install python headless, set envirnoment variables in the activate script, before start the venv. |
Did you try |
Im still gettin gthis error: inside that folder I got only this: libqxcb.so |
I'm not sure then. If you want to undo the changes to your system that was applied through the command I gave previously, you can remove |
(Ubuntu 22.04) Reading package lists... Done |
|
Expected behaviour
Write here how did you expect the library to function.
Actual behaviour
Write here what went wrong.
Steps to reproduce
Issue submission checklist
opencv-python
The text was updated successfully, but these errors were encountered: