3b1b / manim

Animation engine for explanatory math videos
MIT License
62.64k stars 5.81k forks source link

The tutorial start.py cannot be executed properly #2162

Open MidnightBiscuit opened 1 month ago

MidnightBiscuit commented 1 month ago

Describe the error

I am using the the code given as an example at https://3b1b.github.io/manim/getting_started/quickstart.html (SquareToCircle class). Those 9 lines of code are saved in G:\toto\start.py. I launch this in Anaconda prompt with python 3.12 activated. I installed ffmpeg and added to PATH, I then ran pip install manimgl. Note that the install structure is different from the one shown at this page, after running pip install manimgl I have :

manimlib/ │ ├── animation/ │ ├── ... │ ├── default_config.yml │ └── window.py ├── custom_config.yml

Also, note that running manimgl alone, I have a grey window that is not responding, and typing anything in the console does nothing.

Code and Error

The command I execute is the following, with the command output and the error following

Code: (py312) C:\Users\blabla>manimgl "G:\toto\start.py" SquareToCircle ManimGL v1.6.1 [21:09:43] INFO Using the default configuration file, which you can modify in config.py:265 c:\users\blabla\anaconda3\envs\py312\lib\site-packages\manimlib\default_config.yml INFO If you want to create a local configuration file, you can create a file named config.py:266 custom_config.yml, or run manimgl --config

Error: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\blabla\anaconda3\envs\py312\Scripts\manimgl.exe__main.py", line 7, in File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib__main.py", line 25, in main scene.run() File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib\scene\scene.py", line 91, in run self.construct() File "G:\toto\Start.py", line 5, in construct circle = Circle() ^^^^^^^^ File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib\mobject\geometry.py", line 324, in init Arc.init(self, 0, TAU, **kwargs) File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib\mobject\geometry.py", line 218, in init VMobject.init__(self, **kwargs) File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib\mobject\types\vectorized_mobject.py", line 85, in init super().init(**kwargs) File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib\mobject\mobject.py", line 89, in init__ self.init_points() File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib\mobject\geometry.py", line 221, in init_points self.set_points(Arc.create_quadratic_bezier_points( File "C:\Users\blabla\anaconda3\envs\py312\Lib\site-packages\manimlib\mobject\types\vectorized_mobject.py", line 968, in wrapper if not np.all(self.get_points() == old_points): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: operands could not be broadcast together with shapes (24,3) (0,3)

Environment

OS System: Win 11 manim version: master python version: 3.12

zangjiucheng commented 3 weeks ago

3.10 is working for now, I got the same issue. Major issue with numpy library, version conflict.