Packaging TeX Live For MSYS2

Installing Manim on windows.

Manim Installation On Windows

 

Manim is an animation engine for explanatory math videos. It was written by Grant Sanderson and popularized by his YouTube channel, 3Blue1Brown.
Here, is a guide for installing Manim on Windows. This post, would be a go through steps of installing Manim, both the 3b1b Version and also Community Version. You could install any one of your choice but, if you plan to work on some kind of project for your own use I personally recommend using the Community Version.

Minimum Requirements

  1. A windows PC. Windows 7+.
  2. Both 32-bit and 64-bit CPU supported.
  3. Minimum of 100 Mb of Disk Space. This space excludes other dependencies like LaTex and also the videos you Generate.
  4. A good Internet connection.
  5. Chocolatey Package Manager Installed.

3b1b Version (Consider using Community Version)

This is on how to install Cairo Version which is vanished now. :/
Now, assuming you are a great fan of Grant Sanderson, let's begin.
Additional Dependencies
These are some additional dependencies which we would need to install before installing Manim by 3b1b. I will guide through it step by step.
  • FFmpeg
  • Cairo
  • Sox (optional, for sound)
  • LaTeX (optional, for LaTeX)

External Depenencies

Installing FFmpeg

  1. Using chocolatey
    • If you have previously installed chocolatey in your PC, you could very well run the below command to install FFmpeg and add it to your path.
       choco install ffmpeg
    • You can check you did it right by running refreshenv to update your environment variable and running ffmpeg.
  2.  Installing Manually(Note: The one specified here doesn't work. Use chocolatey to Install)
    • Download latest version on FFmpeg from https://ffmpeg.zeranoe.com/builds/ . Although there is a dedicated FFmpeg website, the file that you can download from there won't work with Windows 10.
    • Select from from the options and download ffmpeg-install-manim
    • Download and extract the FFmpeg folder. You can use your computer's built-in unzip feature to do this.
    • Open your hard drive's folder. Rename your folder downloaded as ffmpeg and pasted in Local Disk C: or C:.
    • Running the command below does the above steps of adding to path.
      setx PATH %PATH%;C:\ffmpeg\bin
      
      Alternatively see the steps below to add it manually using GUI inteface.
    • Adding FFmpeg to path manually
      • Now, right click your This PC and click on Properties. After that click on Advanced system settings. This link is in the upper-left side of the Properties window. A new window will open. See the picture below.
        manim-ffmpeg-windows-install-setting
      • Click on Environment Variables on the opening window.
      • Edit the Path value by double clicking it. You could edit the user path or that of the system which depends on whether you need it installed for all users or not. If need to install for all users edit the system path and vice versa. The value which need to be added as below.
        C:\ffmpeg\bin
        
        ffmpeg-manim-install-environment-variable
    • Finally, open a new command prompt( cmd ). And check whether the below command works.
      ffmpeg -version
      
      If it works you have successfully installed FFmpeg. See below picture.
      ffmpeg-version-command-output

Installing Cairo

This section has moved here.

    Installing Sox

    1. Go to the SoX SourceForge page
    2. Select the newest version, and download the .exe file. soc-installation-manim
    3. Add SoX to your PATH.
      1. Find the directory where SoX is installed. By default, this is probably C:\Program Files (x86)\sox-(version_number) or C:\Program Files\sox-(version_number).
      2. Open a Command Prompt and run the following command to add it to your path.
        setx PATH %PATH%;C:\Program Files (x86)\sox-(version_number)
        
        Alternatively, you can change the path as done in adding ffmpeg to path.
      3. Check whether is correct, by running refreshenv to update your environment variable and running sox command.
       

    Installing LaTeX

    You can choose between the two version of LaTeX. Either install a full LaTeX for custom LaTeX templates or install a small chocolatey package made by me for Manim Community actually but can also be used here also. The choice is arbitrary because both effectively does the same but are of different choice full would take around 8 Gb but the custom one would take around 500 MB. 

    1. Using Miktex:

      You can simply go ahead to the download page and run the installer with the default configuration and it will download things. You can also use TexLive if interested.
    2. Using Manim LaTeX:

      1. Install Chocolatey.
      2. Open an elevated Command Prompt (Run as Adminstrator) and run the Command
         choco install manim-latex
      3. You will have LaTeX installed.

    Actually Installing

    After completing all the other steps you are ready to run
    pip install manimlib
    Which will install the Python Module and adds the manim commands to your teminal. You can then run a example scene to check whether it actually worked.

    Manim Community Version

    Install Manim Community Version is very simple and doesn't require elaborate procedure like 3b1b's.

    Better that me writing the installation instructions over here I would simply ask user's to head to the official documentation https://docs.manim.community/en/latest/installation/win.html#installing-using-chocolatey where I and some other people have explained it even better me doing it and maintaining here.

    Comments