Skip to main content

Manim Community Edition 'interactive' plugin

Getting Started

Installation

There are several components that require installation:

  • manim (Community edition) - obviously
  • OpenGL for your machine (we use --renderer=opengl)
  • manim_interactive - this plugin
  • manimvs VScode extension

Further details

First you will want to install manim. Make sure it is the Manim Community edition, and not the original 3Blue1Brown Manim version.

In addition, we will be using the OpenGL renderer (which is not exactly the same as the regular Cairo renderer). The reason is that the Cairo one renders to video files fine, but isn't really intended for 'realtime/interactive' usage (unless you are prepared to wait for lots of video regeneration).

To install the essentials required for OpenGL (on Fedora), I needed to run (as root):

# For manim (base)
dnf install pango-devel texlive-dvisvgm texlive-standalone
# For manim OpenGL backend
dnf install mesa-libGL libglvnd-devel

# The latter of these packages was discovered by running:
dnf provides '*/libGL.so'

Then install this plugin pip install manim_interactive (you can also use uv pip install manim_interactive) - or install from source (for debugging, see below).

Also install the manimvs extension in vscode.
I chose to base this plugin on that that extension, since it does not depend on 3b1t manim to run.

Debugging

This is only required if you want to debug this manim plugin : Normal usage should just require the installation steps above.

Install poetry module, to manage the development environment in a way that is compatible with the manim ecosystem.

For me, using Fedora (during development), I needed to do (as root):

dnf install poetry

Then use the Python environment defined through poetry (as user):

poetry shell
poetry install

The manim file I used during development was the simple testbed.py file included here.

Usage / Setting Up a Scene

Running this interactive session requires a few steps:

  • import this plugin
  • add a self.embed() breakpoint to your scene
  • run manim in a VScode terminal window
  • connect manimvs extension to the terminal window
  • select the appropriate line(s) in vscode, and press the magic hotkeys

Further details

In the file that you want to interactively edit, please make sure you've included manim_interactive:

from manim import * # Already there
# ... other stuff
from manim_interactive import *
# ... etc

This will simply give you the checkpoint_paste() command in the interactive session.

Then, in that scene, before a comment starting a segment that you are building out (or refining), insert the following:

self.embed()

(See the testbed.py file here to see how it looks in practice).

Then, you can create a terminal in a separate window in VScode ("Create Terminal New Window = Ctrl-Shift-Alt-`", or create a Terminal session and right-click in its task bar to "Move Terminal to New Window"), and run there (updated for your file/scene):

manim testbed.py SimpleTest --renderer=opengl -p

to get an interactive scene.

Then, connect that terminal using the manimvs extension command Manimgl: Select terminal (Python3).

Then, go to the line(s) that you want to debug and use the manimvs extension command Manimgl: On Cursor Checkpoint Paste (it'll likely be helpful to bind this to a key combo, like Ctrl-m-Ctrl-p).

There are several modes of 'Checkpoint Paste' in the editor:

  • editor cursor is on a line of code : This line is executed immediately
  • editor has lines of code selected : These lines are executed immediately
  • editor cursor in on a commented line : Saves a checkpoint (corresponding to the contents of the line), which you can reset the scene to by redoing this commented-line CheckpointPaste : This is the key time-saving feature! and then runs the block up until the next commented line

Release files for manim-interactive 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for manim-interactive 0.1.0
File Size Uploaded
manim_interactive-0.1.0.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for manim-interactive 0.1.0
File Interpreter ABI Platform
manim_interactive-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.7 kB

Release files / manim_interactive-0.1.0.tar.gz

Download URL manim_interactive-0.1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ab5a3314f9632eb5cfa62e93fb410db794eeafbd4dd2a8dff56018510f20b0de
BLAKE2b-256 checksum
How to use checksums
3fec8dfa91c4d69862e2a9842163e7a5c7eb406044a874decf9465ace2ae56fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.13.6 Linux/6.15.9-201.fc42.x86_64

Release files / manim_interactive-0.1.0-py3-none-any.whl

Download URL manim_interactive-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94ce2f07fd4c020b68ff52e44170267b0fa750f68b21a4c3b77d3ffa7cbeb4a5
BLAKE2b-256 checksum
How to use checksums
597a2c7907149e87d8ab5d0e6467784d2585dad7b93e5b05bc641240a788aedb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.13.6 Linux/6.15.9-201.fc42.x86_64

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page