Skip to content

Commit a67282e

Browse files
authored
Add installation guide & improve docs (#115)
* Add detailed installation guide for Manim & its dependencies * Make explicit that we don't install ffmpeg or latex * Link to dev guide in the contributing file * Update year of license file * Link to releases section in Changelog * Add header to changelog * Update mont/year of readme note
1 parent 210d48c commit a67282e

File tree

5 files changed

+103
-36
lines changed

5 files changed

+103
-36
lines changed

CHANGELOG.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Change Log
1+
# Changelog
22

3-
All notable changes to the "Manim Notebook" extension will be documented in this file.
4-
5-
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6-
7-
## [Unreleased]
8-
9-
- Initial release
3+
Our [Releases section](https://github.com/Manim-Notebook/manim-notebook/releases) documents all changes made to the Manim Notebook extension. This includes new features, bug fixes, and other improvements.

CONTRIBUTING.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
11
# Contributing
22

3-
1. Fork the repository and clone this fork
4-
2. Create a new branch: `git checkout -b feature/your-feature-name`
5-
3. Make your changes
6-
4. Commit your changes: `git commit -m "Add your commit message"`
7-
5. Push to the branch on your fork: `git push origin feature/your-feature-name`
8-
6. Open a Pull Request
9-
10-
## Style Guidelines
11-
12-
Right now, the goal is to replicate Grant's sublime workflow in VSCode. Thus, we currently aim to keep things minimal and focused.
13-
14-
- Most new functionality should be added to `src/extensions.ts`
15-
- Use clear and descriptive variable/function names.
16-
- As much as possible, minimize editing global state (e.g., the clipboard). This is already done a lot inside the manim 🙈
17-
18-
## Additional Guidelines
19-
20-
- Before starting work on a new feature, please open an issue to introduce it and allow discussion
21-
- There is currently no documentation. Keep your code clean and describe the functionality in the github issue as much as possible.
3+
See the [Developing Guide](https://github.com/Manim-Notebook/manim-notebook/wiki/Developing) in our Wiki.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Manim Notebook Contributors
3+
Copyright (c) 2024-2025 Manim Notebook Contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</div>
1818

1919
> [!note]
20-
> December 2024: Hey there👋 We are currently working to ship the first release of Manim Notebook. The version already available on the VSCode Marketplace is outdated. If you are interested in the current state of the extension, just clone this repo and follow the [Developing guide](https://github.com/Manim-Notebook/manim-notebook/wiki/Developing).
20+
> December 2024 / January 2025: Hey there👋 We are currently working to ship the first release of Manim Notebook. The version already available on the VSCode Marketplace is outdated. If you are interested in the current state of the extension, just clone this repo and follow the [Developing guide](https://github.com/Manim-Notebook/manim-notebook/wiki/Developing).
2121
2222
> [!warning]
2323
> This VSCode extension is specifically for [3b1b's original manim library](https://github.com/3b1b/manim)<br>

src/walkthrough/manim-installation.md

Lines changed: 98 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,107 @@
2020

2121
> **Manim Notebook only works with ManimGL by 3Blue1Brown,<br>NOT with the community edition of Manim (Manim CE)**.
2222
23-
If you haven't already installed ManimGL, follow the [**Manim installation guide**](https://3b1b.github.io/manim/getting_started/installation.html). This will be the most difficult part of all the steps here and there are quite a few dependencies to install. But don't despair; with a bit of patience and StackOverflow you will get there.
23+
Unfortunately, installing 3Blue1Brown's Manim is not a trivial task due to its dependencies. Luckily, you have to do this only once. Get yourself some quiet time, and follow the steps below.
2424

25-
We recommend to install Manim by cloning the GitHub repo and using
25+
- First, note that there is a [**Manim installation guide**](https://3b1b.github.io/manim/getting_started/installation.html) available. However, it mainly just tells you _what_ to install and not _how to_.
26+
- In the GitHub Actions pipeline for our Manim Notebook extension, we succeeded to automatically install ManimGL on the latest macOS, Ubuntu, and Windows. So take inspiration from there, i.e. this [`tests.yml`](https://github.com/Manim-Notebook/manim-notebook/blob/main/.github/workflows/tests.yml) workflow, as well as [this `manimInstaller.ts`](https://github.com/Manim-Notebook/manim-notebook/blob/main/tests/utils/manimInstaller.ts). It might be worth it to search for keywords there if you encounter errors during installation.
27+
28+
## 💨 Dependency installation guidance & quirks
29+
30+
- Note that we don't install ffmpeg in these steps. ManimGL will work without it as well if you just want to preview animations (it will just show a warning, that's it). To finally render your animations to an `.mp4` file, you will need ffmpeg, though.
31+
- We also don't install LaTeX in these steps. If you want to use LaTeX in your animations, you will need to install LaTeX separately.
32+
33+
**Python `3.13` (any OS)**
34+
35+
```py
36+
# https://github.com/jiaaro/pydub/issues/815
37+
pip install audioop-lts
38+
```
39+
40+
**Linux (e.g. Ubuntu)**
41+
42+
You probably need the OpenGL Mesa Utils.
43+
44+
```py
45+
# Install OpenGL Mesa Utils
46+
sudo add-apt-repository ppa:kisak/kisak-mesa
47+
sudo apt-get update
48+
sudo apt-get install mesa-utils -y
49+
50+
# Install PyOpenGL
51+
pip install PyOpenGL
52+
53+
# Test your OpenGL version via:
54+
xvfb-run -a glxinfo | grep "OpenGL version"
55+
56+
# Install Pango
57+
sudo apt-get install libpango1.0-dev -y
58+
```
59+
60+
Only apply those fixes in case you encounter the respective errors:
61+
62+
```py
63+
# Work around 'NoneType' object has no attribute 'glGetError'
64+
# https://github.com/MPI-IS/mesh/issues/23#issuecomment-607784234
65+
sudo apt-get install python3-opengl
66+
67+
# Install copy-paste mechanism to avoid ClipboardUnavailable errors
68+
# (python pyperclip makes use of xclip on Linux)
69+
sudo apt-get install xclip -y
70+
```
71+
72+
73+
**Windows**
74+
75+
Windows itself only comes with OpenGL 1.1, which is not enough for ManimGL. We found that the easiest way to do so is via [this amazing repo](https://github.com/pal1000/mesa-dist-win), which serves precompiled Mesa3D drivers for Windows. In a PowerShell, run:
76+
77+
```powershell
78+
# Install OpenGL pre-built Mesa binaries from mesa-dist-win
79+
Invoke-WebRequest -Uri https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z -OutFile mesa3d.7z
80+
81+
# Extract (on purpose no space between -o and mesa3d)
82+
7z x mesa3d.7z -omesa3d
83+
84+
# Install system-wide (option 1: core desktop OpenGL drivers)
85+
.\mesa3d\systemwidedeploy.cmd 1
86+
```
87+
88+
Test your OpenGL version:
89+
90+
```bash
91+
# Download wglinfo (analogous to glxinfo)
92+
curl -L -O https://github.com/gkv311/wglinfo/releases/latest/download/wglinfo64.exe
93+
chmod +x wglinfo64.exe
94+
./wglinfo64.exe | grep "OpenGL version"
95+
```
96+
97+
**macOS**
98+
99+
Lucky you, macOS already came with everything that ManimGL needed out of the box in our tests. We don't know a way to retrieve the OpenGL version on macOS, if you happen to know one, please let us know [in a new issue](https://github.com/Manim-Notebook/manim-notebook/issues).
100+
101+
## 💨 ManimGL installation
102+
103+
Finally, installing ManimGL should be as easy as installing any other Python package. However, we recommend installing it in an isolated environment to avoid conflicts with other packages. You can do so by creating a new virtual environment and installing ManimGL there.
26104

27105
```bash
28-
git clone https://github.com/3b1b/manim.git
29-
cd manim
30-
pip install -e .
106+
# Clone Manim anywhere you like.
107+
# Here, we assume you want to store it in `~/dev/manim/`
108+
git clone https://github.com/3b1b/manim.git ~/dev/manim/
109+
110+
# Change into the directory where you want to use Manim,
111+
# e.g. `~/dev/manim-videos/`
112+
# and create a new virtual environment there,
113+
# where you will install Manim and its Python dependencies.
114+
cd ~/dev/manim-videos/
115+
python3 -m venv manim-venv
116+
. manim-venv/bin/activate # source the activate script
117+
118+
# Now `pip --version` should show its version and a path in your `manim-venv/`
119+
# directory. That is, you are now in the virtual environment (venv)
120+
# Finally, install ManimGL and its Python dependencies into that venv.
121+
pip install -e ~/dev/manim/
31122
```
32123

33-
This way, you can easily update Manim by pulling the latest commits from the repo (`git pull`) and don't have to wait for a new release.
124+
Note that via this technique, the `manimgl` command is only available in the virtual environment (which is actually a good thing due to the isolation). If you want to upgrade Manim, it's as easy as pulling the latest commit from the repo: `git pull` (inside the `~/dev/manim/` folder). You might have to re-run `pip install -e ~/dev/manim/` afterwards (inside the virtual environment (!)). Note that the VSCode Python extension by Microsoft will also detect that you use a virtual environment: upon opening a new terminal, it will automatically source the `activate` script for you.
34125

35-
Check your Manim version by running `manimgl --version` or just click on the button on the left.
126+
Finally, check your Manim version by running `manimgl --version`. If this shows the latest version, you have successfully installed ManimGL, congratulations! 🎉 This was the most difficult part, from now on it should be a breeze to use Manim.

0 commit comments

Comments
 (0)