3b1b / manim

Animation engine for explanatory math videos
MIT License
70.18k stars 6.17k forks source link

TypeError: 'staticmethod' object is not callable #2126

Open Ex-monsters opened 6 months ago

Ex-monsters commented 6 months ago

Describe the error

Once I've installed the conda environment, after installing the dependencies in the requirements, executing manimgl comes up. The installation configuration is the reference https://docs.manim.org.cn/.

Code and Error

Code: (manim) E:\manim>manimgl 48df3ebaf734a046ab09c9db0a37426 ec0e47b7da5919fb334e9812fcb18b7

Error: Traceback (most recent call last): File "E:\anaconda\envs\manim\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "E:\anaconda\envs\manim\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "E:\anaconda\envs\manim\Scripts\manimgl.exe__main.py", line 4, in File "E:\manim\manimlib\init__.py", line 14, in from manimlib.animation.animation import * File "E:\manim\manimlib\animation\animation.py", line 5, in from manimlib.mobject.mobject import _AnimationBuilder File "E:\manim\manimlib\mobject\mobject.py", line 64, in class Mobject(object): File "E:\manim\manimlib\mobject\mobject.py", line 230, in Mobject def set_data(self, data: np.ndarray) -> Self: TypeError: 'staticmethod' object is not callable

Environment

OS System: manim version: master python version:Python 3.8.19

Felix20021231 commented 5 months ago

I meet the same problem

diogodsa commented 5 months ago

I am also having the same error.

LuoRongKang commented 5 months ago

I am also having the same error.

zykRichard commented 5 months ago

Same Error. Any idea now?

Sourish07 commented 5 months ago

I upgraded from Python 3.8 to 3.10! Hope that helps

Loyage commented 4 months ago

I solved it by commenting out all @staticmethod line in file mobject.py and scene.py.

In your environment, they are:

"E:\manim\manimlib\mobject\mobject.py"

"E:\manim\manimlib\scene\scene.py"

So try to replace all the @staticmethod by # @staticmethod in these two files.

Khurramcoder commented 3 months ago

i have same issue

Hlaejanor commented 2 months ago

The comment above about python 3.10 helped me. This was on OSX

For noobs here is a tutorial : `run python -V and see if you have an old python version. I had 3.9.

You might need to download python3.10. I had several python versions, and for. me 3.10 vas available at python3.10 -V ->

Locate python 3.10 or higher and create a virtual environment using it.

python3.10 -m venv venv

Then , activate the venv

source venv/bin/activate

Now, you can try to use the python command again, and now the version is 3.10 `python -V (should give you 3.10 or more)

Then install run pip install -e .

Then run the example manimgl example_scenes.py OpeningManimExample

zangjiucheng commented 2 months ago

Currently working python version to me is 3.10.14 (3.12 (numpy) and 3.9 (@staticmethod) both fall to my compiler)

(On M1 MacOS 15.0-beta)

thebinij commented 3 weeks ago

Working just fine (without changing anything) with python 3.11.4 on M1 Pro 2020 (macOS 15.0.1).

seusrj commented 2 weeks ago

updating python to 3.10 may be useful

boring180 commented 2 weeks ago

Change from 3.9 to 3.10 and solve. I hope this is useful.