Rickaym / manim-sideview

A Manim utility extension for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=Rickaym.manim-sideview
MIT License
101 stars 11 forks source link

Tried running "Manim Sideview" for the 1st time, keep getting error message #91

Closed Szmorox closed 3 months ago

Szmorox commented 3 months ago

Hi everyone! I just found out about Manim and wanted to learn it. I followed the Manim Community guide to download want is necessary for it to work.

I have a Macbook Pro M3max. I downloaded Homebrew, then run the lines:

and (I know this is not mandatory)

Downloaded VScode (v1.90.0) for Mac with Apple Silicon, then installed the following extensions:

I tried to do a very simple project to see if everything works (I upload pictures of it if I can), but keep getting these Error messages:

MSV /Users/johnsnow/Desktop/Manim/>"manim" "/Users/johnsnow/Desktop/Manim/Demo.py" demo Error: spawn manim ENOENT[undefined] Execution returned code=-2 in 0.002 seconds

johnsnow@Snow-MacBook-Pro ~ % /usr/bin/python3 /Users/johnsnow/Desktop/Manim/Demo.py Traceback (most recent call last): File "/Users/johnsnow/Desktop/Manim/Demo.py", line 1, in from manim import File "/Users/johnsnow/Library/Python/3.9/lib/python/site-packages/manim/init.py", line 112, in from .plugins import File "/Users/johnsnow/Library/Python/3.9/lib/python/site-packages/manim/plugins/init.py", line 5, in from .plugins_flags import get_plugins, list_plugins File "/Users/johnsnow/Library/Python/3.9/lib/python/site-packages/manim/plugins/plugins_flags.py", line 9, in from importlib_metadata import entry_points ModuleNotFoundError: No module named 'importlib_metadata'

I tried looking up the internet for a solution, but I can't seem to find a fix for it; one suggestion I got is to try changing the "python interpreter" in VScode, then got a slightly different Error message.

johnsnow@Snow-MacBook-Pro ~ % /opt/homebrew/bin/python3 /Users/johnsnow/Desktop/Manim/Demo.py Traceback (most recent call last): File "/Users/johnsnow/Desktop/Manim/Demo.py", line 1, in from manim import * ModuleNotFoundError: No module named 'manim'

Rickaym commented 3 months ago

Odd, that does not seem to be an issue with the manim sideview. However, can you change your environment back to the original environment and install the required package manually?

pip3 install importlib-metadata

Szmorox commented 3 months ago

It won't upload all the pictures sadly

Képernyőfotó 2024-06-11 - 17 04 08 ![Képer Képernyőfotó 2024-06-11 - 17 05 46 nyo Képernyőfotó 2024-06-11 - 17 05 32 ̋fotó 2024-06-11 - 17 03 52](https://github.com/Rickaym/manim-sideview/assets/172408701/8b7b4d38-7a2a-4b2

Rickaym commented 3 months ago

It seems like you are still in a different environment, can you go back to your initial environment?

Rickaym commented 3 months ago

@Szmorox How did this go?

Szmorox commented 3 months ago

So, sorry for disappearing for a few days, but I was really trying to solve this problem. You were right, the problem was not with "Manim SideView". I finally managed to solve it with your help, and here's how I did it (a little simplified).

The problem was with the Python installation with this command:

$ brew install py3cairo ffmpeg

Something crashed during the initial installation. And not the whole file package downloaded, but because of how Linux and MacOS works, it thought it did, and a normal reinstallation did not fix the problem.

I had to dig through the Homebrew website for help. I was trying a lot of command to see if anything would work and eventually, I managed to find this command:

$ pip3 install manim --break-system-packages

which solved the issue and somehow downloaded the whole package. Surprise, surprise now everything works just fine. I can edit, I can preview, and I can render animations.

So thank you very much for your help. I am very happy; I can't wait to learn more about Manim.