-
Notifications
You must be signed in to change notification settings - Fork 2.2k
importing manim should not trigger pygments.styles.get_all_styles
#3713
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
Comments
There appears to be some weird interaction between $ 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 |
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. |
pygments.styles.get_all_styles
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. |
Regarding the attribute removal, would it be a good idea, instead, to add a class method (say |
I took a stab at implementing a class method See #3797 for the PR, and let me know if there's anything I'd need to do (it's my first contribution). |
Upon running
import manim
, and in particular during the initialization ofmanim.mobject.text.code_mobject.Code
, astyles_list
attribute is populated with the output ofpygments.styles.get_all_styles()
.This causes a lot of overhead and can lead to serious breakage (as documented by the original report below).
Tasks:
Code.styles_list
attribute,pygments.styles.get_all_styles
yourself,Code
should be rewritten to not useCode.styles_list[15]
, but instead the explicit name of a code style.Original report:
Description of bug / unexpected behavior
I tried to make a video and wanted to see the demo by
manim -pql scene.py MemoryMapping
. But it fails with an exception.I also tried to do
sudo pacman -Rscn cython
as others say that cython uses gdb but did nothing useful.Expected behavior
The command works correctly and gives me a video
How to reproduce the issue
Code for reproducing the problem
Additional media files
Images/GIFs
I have no media because nothing succeed.
Logs
Terminal output
System specifications
System Details
python/py/python3 --version
): Python 3.11.8pip list
):https://pastebin.com/TzLmr6nV
LaTeX details
tlmgrlist.txt
FFMPEG
Output of
ffmpeg -version
:Additional comments
I also installed blackarch on the top of archlinux. so there are a lot of packages. blackarch might have packages that causes the error but i didn't find anything useful. Manim was installed via
paru -S manim
The text was updated successfully, but these errors were encountered: