Code Monkey home page Code Monkey logo

Comments (5)

jeertmans avatar jeertmans commented on May 19, 2024

Hi @lucaslibshutz, thanks for raising this issue :)

This bug is weird, and Manim Slides should work fine just in one pip install.

Can you create a virtual environment, pip install manim and manim-slides, and copy the output of the installation process? Then, run manim and then manim-slides to see if they work?

Thanks in advance!

Ps: Manim Slides uses PySide6, not PyQt5, so I am not sure about this pyqt5-tools you installed.

from manim-slides.

lucaslibshutz avatar lucaslibshutz commented on May 19, 2024

Hi @jeertmans ,

I made a new Conda environment, installed manim and manim-slides from scratch, and it worked like a charm! However, I think I was able to find the main problem.

Whenever the user installs the base conda environment, it automatically has qt packages installed, while a fresh environment does not. See the below, where the base environment has both manim and manim-slides installed along with base pip packages, and the sTest environment, with both manim and manim-slides installed:
image

Therefore, when I try to use manim-slides with both environments, the below happens (the blank line at the end indicates that manim-slides worked and exited as expected:
image
The sTest environment works without a hitch, while the base environment (after a base Conda install) has the same error as before.

Maybe there is a way for any user's base Conda environment to default to the PySide6 Qt installation, rather than that of QtPy? What do you think?

Thanks for your help!

from manim-slides.

jeertmans avatar jeertmans commented on May 19, 2024

Hi, I am glad you found a way around!

After digging a bit, it seems that creating a virtual env. is the only solution, see this comment by CristianMaureira from this thread:

The problematic area here is that conda is really good to resolve extra dependencies for Python packages, like for example when you try to use the Python OpenGL bindings, but that means they require to have the proper configuration of Qt in their packages. That being said, modules like matplotlib might install a 'qt.conf' file that modify how Qt will work in your environment, which is problematic, because if you have PySide first, then PyQt might not work, and the other way around.

Officially, there is no conda packages for PySide6 provided by the Qt Project (nor the Qt company), and we only provide the ones on PyPi that you can get with pip install pyside6.

So why is that an issue? The wheels you install with pip include Qt binaries, and what if you already have Qt installed in your conda environment? then there will be a problem with all the configurations. This is the main reason on why we encourage users to use a vanilla Python interpreter, create a virtual environment and install pyside and all the other dependencies there.

If you really cannot do that, I'd recommend you to create another 'conda enviroment' and "try" to install there PySide6 and give it a try.

I am closing this as completed, as you found a solution to your problem :)

Many thanks for you interest in this project!

from manim-slides.

shivams avatar shivams commented on May 19, 2024

As a side-note, this error also shows up on Linux/Ubuntu when using pip. The exact error that shows up is this:

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: wayland, wayland-egl, vnc, offscreen, linuxfb, eglfs, xcb, vkkhrdisplay, minimal, minimalegl.

[1]    1398378 IOT instruction (core dumped)  manim-slides BasicExample

The resolution was to install the following packages:

sudo apt install libxcb-cursor0 libxcb-cursor-dev 

from manim-slides.

jeertmans avatar jeertmans commented on May 19, 2024

Thanks @shivams :-) This was actually already documented in the v4.14 release notes.

from manim-slides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.