I found that MacTex didn’t really work for me and I didn’t need to use the last step in Brian Howell’s tutorial so this is an updated and succinct version of his post. His post does cover the first few steps in greater detail if needed
Step 1: Install packages
Paste the following lines into terminal one by one.
If you need to install homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
If you need to install python3:
brew install python3
Packages to install for Manim:
brew install cairo pkg-config virtualenv
Step 2: Install Latex from MikTex Console
Download the MikTex Console from here. I did a private install then paste the following in terminal to fix the path issues to
echo export 'PATH=~/bin:$PATH'>> ~/.bash_profile
I actually have Latex installed from MacTex but it didn’t seem to work for me.
Step 3: Folder Setup & Download Manim
Create a folder where you want the Manim library to be stored in, I recommend you pick one that is only one word like “Animations”. I have a folder named “Projects” in my home directory. I created the Animations folder in the Projects folder so my path is essentially “~/Projects/Animations”
Open a new terminal and cd to that folder as shown below
cd <Path-to-Newly-Created-Directory>
Next we will download that manim37 folder in the image below (at this moment your animation directory should still be empty)
git clone https://github.com/3b1b/manim.git
Next, rename the manim folder that has just been downloaded to manim37 (you don’t have to do this but the following steps does use manim37 as the folder name)
Step 4: Virtual Environment Install Packages
The following commands will change your directory to the manim37 folder, setup and activate a virtual environment and do the package installations for dependencies.
cd manim37
virtualenv venv
source venv/bin/activate
pip3 install sox ffmpeg latex pycairo
pip3 install -r requirements.txt
Step 5: Make an output folder
In the manim37 folder, create a folder called “output”
Step 6: Modify File Path
Open the constants.py found in manim37/manimlib
Change line 27 (the line that says “Dropbox (3Blue1Brown)/3Blue1Brown Team Folder”) to the path to your output folder
My path to the output folder is “~/Projects/Animations/manim37/output” so I will change line 26 to “Projects/Animations/manim37/output”
Step 7: Test & Fixes
Basic Test
Do a test to check if the basic animations are working by entering the following into the terminal
python3 -m manim example_scenes.py
2
You want to select the SquareToCircle example scene so the response is 2 as shown above
You can play the SquareToCircle.mp4 to see if you get a white diamond outline turning into a purple filled red outlined circle
Latex Test for Text Animations
Test if text animations are working by entering the following into the terminal:
python3 -m manim example_scenes.py
5
You want to select the WriteStuff example scene so the response is 5 as shown above.
If this part fails, it is likely because there is something wrong with your latex. I recommend going to the .log files inside the output/Tex folder
You might find lines like:
!LaTeX Error: File `ragged2e.sty' not found.
You can go to MikTex Console (the app you downloaded previously) and search for it in the packages list. To download it, select the package and click the + icon.
The MikTex Console should prompt you when you are running the test program to ask if you want to download the packages needed.