jeertmans / manim-slides

Tool for live presentations using manim
https://manim-slides.eertmans.be
MIT License
446 stars 48 forks source link

[BUG] Install Issue using Ubuntu 22.04 wayland #378

Closed semikernel closed 7 months ago

semikernel commented 7 months ago

Please explain the issue you're experiencing (with as much detail as possible):

At the beginning, I use conda create a new environment and use command:

 pip install -U "manim-slides[pyside6-full]"

I can't use manim-slides in my ubuntu desktop, after "manim-slides BasicExample", it returns:

[03/05/24 08:38:19] WARNING  You are using API = 'pyqt5',         __init__.py:23
                             QT_VERSION = '5.15.2', but we                      
                             recommend installing                               
                             'PySide6==6.5.2', mainly to avoid                  
                             flashing screens between slides, see               
                             issue                                              
                             https://github.com/jeertmans/manim-s               
                             lides/issues/293. You can do so with               
                             `pip install                                       
                             'manim-slides[pyside6]'`.                          
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QObject::moveToThread: Current thread (0x555e3b649860) is not the object's thread (0x555e3b633d80).
Cannot move to target thread (0x555e3b649860)

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/semikernel/.local/lib/python3.10/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb (from /home/semikernel/.local/lib/python3.10/site-packages/cv2/qt/plugins), xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

Aborted (core dumped)

Could anyone please tell me how to figure that out? Thx a lot!

semikernel commented 7 months ago

I uninstalled Qt5 and it works!

jeertmans commented 7 months ago

Happy it solved your issue!

The issue arose because you had multiple Qt bindings installed, i.e., here you had PySide6 and PyQt5. We use qtpy to choose the Qt bindings, and it gives more priority to PyQt than to PySide. So it was always choosing PyQt5 instead of PySide6.

The best to avoid this kind of issues is to install Manim Slides in a separate virtual environment.