3b1b / manim

Animation engine for explanatory math videos
MIT License
70.56k stars 6.2k forks source link

No module named manimlib.__main__ #575

Open ConorONeill2 opened 5 years ago

ConorONeill2 commented 5 years ago

I've installed manim, but can't get it to run the example scenes. I input this command into the command line:

python -m manimlib example_scenes.py SquareToCircle -pl

And I get the following back:

Media will be stored in ./media. You can change this behavior by writing a different directory to media_dir.txt. [File Path]\Python37-32\lib\site-packages\pydub\utils.py:165: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) [File Path]\Python37-32\python.exe: No module named manimlib.main; 'manimlib' is a package and cannot be directly executed


So there's two problems there - first, I have ffmpeg installed in the same folder as all my other libraries, and it works fine, so I don't know why it's not being found here.

Second, and far more importantly, I don't know why it's trying to read manimlib.main, and if that file is meant to exist but somehow didn't get installed, or if something wonky is going on that it's trying to read a file it's not meant to.

I'm running Python 3.7 on a Windows 10 OS.

Kolloom commented 5 years ago

try python -m manim example_scenes.py SquareToCircle -pl

NewWorldVulture commented 5 years ago

I'm having the same issue as OP. When I run the snip you recommended, I get the following:

python -m manim example_scenes.py SquareToCircle -pl
C:\Users\~\AppData\Local\Programs\Python\Python37-32\python.exe: No module named manim

Environment variables are set up fine, confirmed that manimlib is installed.

Kolloom commented 5 years ago

@NewWorldVulture

Did you install it with pip3 from pypi? Run it with python3 On some system python defaults to 2.7

NewWorldVulture commented 5 years ago

There's no Python 2 on this computer. Just to confirm, I ran it with python3: python3 -m manim example_scenes.py SquareToCircle -pl 'python3' is not recognized as an internal or external command, operable program or batch file.

Kolloom commented 5 years ago

are you running from within the manim repo ?

NewWorldVulture commented 5 years ago

Ah. My brain just now turned on. No, I downloaded manimlib through pip, so of course I won't have the example_scenes.py. I'm able to import manimlib in a Python shell, so I don't think this is an actual issue. If OP followed the same Windows Installation instructions I did, I suspect they're in the same boat. We won't be able to run the commands "as is". Thank you for helping, @Kolloom !

yoshiask commented 5 years ago

@ConorONeill2 Are you still having issues?

stevenschn commented 4 years ago

Ah. My brain just now turned on. No, I downloaded manimlib through pip, so of course I won't have the example_scenes.py. I'm able to import manimlib in a Python shell, so I don't think this is an actual issue. If OP followed the same Windows Installation instructions I did, I suspect they're in the same boat. We won't be able to run the commands "as is". Thank you for helping, @Kolloom !

@NewWorldVulture Any comments on how you fixed this or what commands you did use!? I am in the same boat but have no clue...