Installation¶
While installing Manim Slides and its dependencies on your global Python is fine, we recommend using a virtual environment (e.g., venv) for a local installation.
Therefore, the following documentation will install Manim Slides using pipx. This tool is a drop-in replacement for installing Python packages that ship with one or more executable.
The benefit of using pipx is that it will automatically create a new virtual environment for every package you install.
Note
Every time you read pipx install, you can use pip install instead,
if you are working in a virtual environment or else.
Dependencies¶
Manim Slides requires either Manim or ManimGL to be installed, along with their dependencies. Having both packages installed is fine too.
If none of those packages are installed, please refer to their specific installation guidelines:
Pip Install¶
The recommended way to install the latest release with all features is to use pipx:
pipx install -U "manim-slides[pyside6-full]"
Tip
While not necessary, the -U indicates that we would
like to upgrade to the latest version available,
if Manim Slides is already installed.
Note
The quotes " are added because not all shell support unquoted
brackets (e.g., zsh) or commas (e.g., Windows).
You can check that Manim Slides was correctly installed with:
manim-slides --version
Custom install¶
If you want more control on what dependencies are installed, you can always install the bare minimal dependencies with:
pipx install -U manim-slides
And install additional dependencies later.
Optionally, you can also install Manim or ManimGL using extras[1]:
pipx install -U "manim-slides[manim]" # For Manim
# or
pipx install -U "manim-slides[manimgl]" # For ManimGL
For optional dependencies documentation, see next section.
Warning
If you are installing with pipx, this is mandatory to at least include
either manim or manimgl.
Optional dependencies¶
Along with the optional dependencies for Manim and ManimGL, Manim Slides offers additional extras, that can be activated using optional dependencies:
full, to includemagic,manim, andsphinx-directiveextras (see below);magic, to include a Jupyter magic to render animations inside notebooks. This automatically installsmanim, and does not work with ManimGL;manimandmanimgl, for installing the corresponding dependencies;pyqt6to include PyQt6 Qt bindings;pyqt6-fullto includefullandpyqt6;pyside6to include PySide6 Qt bindings. Those bindings are available on most platforms and Python version, except on Python 3.12[2];pyside6-fullto includefullandpyside6;sphinx-directive, to generate presentation inside your Sphinx documentation. This automatically installsmanim, and does not work with ManimGL.
Installing those extras can be done with the following syntax:
pipx install -U "manim-slides[extra1,extra2]"
Nixpkgs installation¶
Manim Slides is distributed under Nixpkgs >=24.05. If you are using Nix or NixOS, you can find Manim Slides under:
nixpkgs.manim-slides, which is meant to be a stand alone application and includes PyQt6 (see above);nixpkgs.python3Packages.manim-slides, which is meant to be used as a module (for notebook magics), and includes IPython but does not include any Qt binding.
You can try out the Manim Slides package with:
nix-shell -p manim ffmpeg manim-slides
or by adding it to your configuration file.
Alternatively, you can try Manim Slides in a Python environment with:
nix-shell -p manim ffmpeg "python3.withPackages(ps: with ps; [ manim-slides, ...])"
or bundle this into your Nix environment.
Note
Nix does not currently support manimgl.
When you need a Qt backend¶
Before v5.1, Manim Slides automatically included PySide6 as
a Qt backend. As only the manim-slides present and manim-slides wizard
commands need a graphical library, and installing PySide6 on all platforms
and Python versions can sometimes be complicated, Manim Slides chooses
not to include any Qt backends.
The user can choose between PySide6 (best) and PyQt6, depending on their availability and licensing rules.
As of v5.1, you need to have Qt bindings installed to use
manim-slides present or manim-slides wizard. The recommended way to
install those are via optional dependencies, as explained above.
Install from source¶
An alternative way to install Manim Slides is to clone the git repository, and build the package from source. Read the contributing guide to know how to process.