Giter Club home page Giter Club logo

Comments (4)

behackl avatar behackl commented on June 9, 2024

There appears to be some weird interaction between pygments (which manim uses in order to highlight code visualized via the Code mobject) and voltron, a package that we do not depend on in any way (your pip list output is gigantic!). The immediate workaround on your end would be to create a separate virtual environment and use manim from there:

$ python3.11 -m venv py-manim
$ source py-manim/bin/activate
$ pip install manim
$ manim -pql ...

However, I do see an issue with manim itself here too: we should probably avoid running pygments.styles.get_all_styles() on import manim, as this forces pygments to run a bunch of code that could probably be delayed to the point where Code is actually instantiated.

from manim.

astro-angelfish avatar astro-angelfish commented on June 9, 2024

There appears to be some weird interaction between pygments (which manim uses in order to highlight code visualized via the Code mobject) and voltron, a package that we do not depend on in any way (your pip list output is gigantic!). The immediate workaround on your end would be to create a separate virtual environment and use manim from there:

$ python3.11 -m venv py-manim
$ source py-manim/bin/activate
$ pip install manim
$ manim -pql ...

However, I do see an issue with manim itself here too: we should probably avoid running pygments.styles.get_all_styles() on import manim, as this forces pygments to run a bunch of code that could probably be delayed to the point where Code is actually instantiated.

Thanks. Creating a separate environment works for me.

I'm not going to close this issue because there's still an issue with manim itself. If it is required please feel free to help me close this issue.

from manim.

behackl avatar behackl commented on June 9, 2024

No, this issue should be left open; I've just updated title and description with more explicit tasks -- this is actually also a good issue for a first contribution to the library.

from manim.

goldenphoenix713 avatar goldenphoenix713 commented on June 9, 2024

Regarding the attribute removal, would it be a good idea, instead, to add a class method (say get_styles_list or something similar) that more or less accomplishes the same thing, but has the added benefit that it won't run during import. The reason being, it's a bit odd to specifically point someone to another library for a list of available code styles, especially if it's not as widely known as some. This class method would really just be a wrapper, but it might be a bit more cohesive.

from manim.

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.