jeertmans / manim-slides

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

[BUG] qt.qpa.plugin: Could not load the Qt platform plugin "xcb" #478

Closed Haetham96 closed 1 month ago

Haetham96 commented 1 month ago

Terms

Describe the issue

Hello, I am unable to run manim-slides, thank you in advance for your help!

I am on Ubuntu 22.04.5 LTS and my python version is 3.10.12.

I created a python virtual enviornement in which I installed manim with pip3 install manim, and it works fine.

Then, I installed manim-slides with pip install manim-slides[pyside6].

When running an example with manim example.py BasicExample, and then manim-slides BasicExample, I get the following error

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" 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: minimalegl, wayland, vkkhrdisplay, vnc, offscreen, linuxfb, minimal, xcb, wayland-egl, eglfs.

Aborted

Command

manim-slides BasicExample

Issue Type

Installation issue

Python version

Python 3.10.12

Python environment

Error: File slides/checkhealth.json does not exist, check the scene name and make sure to use Slide as your scene base class

What is your platform?

Linux

Other platform

No response

Manim Slides Python code

from manim import *  # or: from manimlib import *
from manim_slides import Slide

class BasicExample(Slide):
    def construct(self):
        circle = Circle(radius=3, color=BLUE)
        dot = Dot()

        self.play(GrowFromCenter(circle))
        self.next_slide()  # Waits user to press continue to go to the next slide

        self.next_slide(loop=True)  # Start loop
        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)
        self.next_slide()  # This will start a new non-looping slide

        self.play(dot.animate.move_to(ORIGIN))

Relevant log output

No response

Screenshots

No response

Additional information

No response

Recommended fix or suggestions

No response

jeertmans commented 1 month ago

Hi @Haetham96, thanks you for reporting this issue!

Are you using Wayland?

Also, can you try this if this fixes your problem? https://github.com/NVlabs/instant-ngp/discussions/300#discussioncomment-3985753

Haetham96 commented 1 month ago

No I am not using Wayland. I tried the proposed solution, still gives the same error.

jeertmans commented 1 month ago

Can try installing Manim Slides only (but with pyside6-full extra) from the main branch?

Haetham96 commented 1 month ago

I did this in my python environment by first pip uninstall manim-slides pyside6 an then pip install git+https://github.com/jeertmans/manim-slides.git@main#egg=manim-slides[pyside6-full] But I still get the same error when running my example

jeertmans commented 1 month ago

Could you check this thread to see if that can help? Also, run the application with QT_DEBUG_PLUGINS set to 1, e.g.:

QT_DEBUG_PLUGINS=1 manim-slides present BasicExample
Haetham96 commented 1 month ago

It works !! Fixed by installing 'libxcb-cursor0' from http://archive.ubuntu.com/ubuntu/pool/universe/x/xcb-util-cursor/libxcb-cursor0_0.1.1-4ubuntu1_amd64.deb

Thank you very much !!

jeertmans commented 1 month ago

Happy it solved your issue :-)