Skip to content

Commit 953888e

Browse files
Rewrite installation instructions (#3930)
Follow-up to #3501 This commit combines all the installation documentation onto one page, and switches to recommending the usage of `uv` for installing Manim.
1 parent d485986 commit 953888e

File tree

12 files changed

+484
-489
lines changed

12 files changed

+484
-489
lines changed

docs/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ myst-parser
33
sphinx>=7.3
44
sphinx-copybutton
55
sphinxext-opengraph
6+
sphinx-design
7+
sphinx-reredirects

docs/source/conf.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,22 @@
5151
"sphinx.ext.inheritance_diagram",
5252
"sphinxcontrib.programoutput",
5353
"myst_parser",
54+
"sphinx_design",
55+
"sphinx_reredirects",
5456
]
5557

5658
# Automatically generate stub pages when using the .. autosummary directive
5759
autosummary_generate = True
5860

61+
myst_enable_extensions = ["colon_fence", "amsmath"]
62+
63+
# redirects (for moved / deleted pages)
64+
redirects = {
65+
"installation/linux": "uv.html",
66+
"installation/macos": "uv.html",
67+
"installation/windows": "uv.html",
68+
}
69+
5970
# generate documentation from type hints
6071
ALIAS_DOCS_DICT = parse_module_attributes()[0]
6172
autodoc_typehints = "description"

docs/source/faq/installation.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,19 +120,24 @@ of [ManimPango's README](https://github.com/ManimCommunity/ManimPango).
120120

121121
---
122122

123+
(not-on-path)=
123124
## I am using Windows and get the error `X is not recognized as an internal or external command, operable program or batch file`
124125

125-
Regardless of whether `X` says `python` or `manim`, this means that the executable you
126-
are trying to run is not located in one of the directories your system is looking
127-
for them (specified by the `PATH` variable). Take a look at the instructions
128-
{doc}`in the installation guide for Windows </installation/windows>`, or
129-
[this StackExchange answer](https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121)
130-
to get help with editing the `PATH` variable manually.
126+
If you have followed {doc}`our local installation instructions </installation/uv>` and
127+
have not activated the corresponding virtual environment, make sure to use `uv run manim ...`
128+
instead of just `manim` (or activate the virtual environment by following the instructions
129+
printed when running `uv venv`).
131130

132-
If `python` is recognized but not `manim` or `pip`, you can try running
131+
Otherwise there is a problem with the directories where your system is looking for
132+
executables (the `PATH` variable).
133+
If `python` is recognized, you can try running
133134
commands by prepending `python -m`. That is, `manim` becomes `python -m manim`,
134135
and `pip` becomes `python -m pip`.
135136

137+
Otherwise see
138+
[this StackExchange answer](https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121)
139+
to get help with editing the `PATH` variable manually.
140+
136141
---
137142

138143
## I have tried using Chocolatey (`choco install manimce`) to install Manim, but it failed!

docs/source/installation.rst

Lines changed: 26 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ require no local installation. Head over to
88
https://try.manim.community to give our interactive tutorial a try.
99

1010
Otherwise, if you intend to use Manim to work on an animation project,
11-
we recommend installing the library locally (either to a conda environment,
12-
your system's Python, or via Docker).
11+
we recommend installing the library locally (preferably to some isolated
12+
virtual Python environment, or a conda-like environment, or via Docker).
1313

1414
.. warning::
1515

@@ -19,13 +19,31 @@ your system's Python, or via Docker).
1919
versions <different-versions>` if you are unsure which
2020
version you should install.
2121

22+
#. :ref:`(Recommended) Installing Manim via Python's package manager pip
23+
<local-installation>`
2224
#. :ref:`Installing Manim to a conda environment <conda-installation>`
23-
#. :ref:`Installing Manim to your system's Python <local-installation>`
2425
#. :ref:`Using Manim via Docker <docker-installation>`
2526
#. :ref:`Interactive Jupyter notebooks via Binder / Google Colab
2627
<interactive-online>`
2728

2829

30+
.. _local-installation:
31+
32+
Installing Manim locally via pip
33+
********************************
34+
35+
The recommended way of installing Manim is by using Python's package manager
36+
pip. If you already have a Python environment set up, you can simply run
37+
``pip install manim`` to install the library.
38+
39+
Our :doc:`local installation guide <installation/uv>` provides more detailed
40+
instructions, including best practices for setting up a suitable local environment.
41+
42+
.. toctree::
43+
:hidden:
44+
45+
installation/uv
46+
2947
.. _conda-installation:
3048

3149
Installing Manim via Conda and related environment managers
@@ -55,48 +73,6 @@ The following pages show how to install Manim in a conda environment:
5573
installation/conda
5674

5775

58-
59-
.. _local-installation:
60-
61-
Installing Manim locally
62-
************************
63-
64-
Manim is a Python library, and it can be
65-
installed via `pip <https://pypi.org/project/manim/>`__
66-
or `conda <https://anaconda.org/conda-forge/manim/>`__. However,
67-
in order for Manim to work properly, some additional system
68-
dependencies need to be installed first. The following pages have
69-
operating system specific instructions for you to follow.
70-
71-
Manim requires Python version ``3.9`` or above to run.
72-
73-
.. hint::
74-
75-
Depending on your particular setup, the installation process
76-
might be slightly different. Make sure that you have tried to
77-
follow the steps on the following pages carefully, but in case
78-
you hit a wall we are happy to help: either `join our Discord
79-
<https://www.manim.community/discord/>`__, or start a new
80-
Discussion `directly on GitHub
81-
<https://github.com/ManimCommunity/manim/discussions>`__.
82-
83-
.. toctree::
84-
:maxdepth: 2
85-
86-
installation/windows
87-
installation/macos
88-
installation/linux
89-
90-
Once Manim is installed locally, you can proceed to our
91-
:doc:`quickstart guide <tutorials/quickstart>` which walks you
92-
through rendering a first simple scene.
93-
94-
As mentioned above, do not worry if there are errors or other
95-
problems: consult our :doc:`FAQ section </faq/index>` for help
96-
(including instructions for how to ask Manim's community for help).
97-
98-
99-
10076
.. _docker-installation:
10177

10278
Using Manim via Docker
@@ -140,6 +116,11 @@ If you're using Visual Studio Code you can install an extension called
140116
of the animation inside the editor. The extension can be installed through the
141117
`marketplace of VS Code <https://marketplace.visualstudio.com/items?itemName=Rickaym.manim-sideview>`__.
142118

119+
.. caution::
120+
121+
This extension is not officially maintained by the Manim Community.
122+
If you run into issues, please report them to the extension's author.
123+
143124

144125
Installation for developers
145126
***************************

docs/source/installation/conda.rst

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,25 @@ namely `conda <https://docs.conda.io/projects/conda/en/latest/user-guide/install
1010

1111
After installing your package manager, you can create a new environment and install ``manim`` inside by running
1212

13-
.. code-block:: bash
1413

15-
# using conda or mamba
16-
conda create -n my-manim-environment
17-
conda activate my-manim-environment
18-
conda install -c conda-forge manim
19-
# using pixi
20-
pixi init
21-
pixi add manim
14+
.. tab-set::
15+
16+
.. tab-item:: conda / mamba
17+
18+
.. code-block:: bash
19+
20+
# if you want to use mamba, just replace conda below with mamba
21+
conda create -n my-manim-environment
22+
conda activate my-manim-environment
23+
conda install -c conda-forge manim
24+
25+
.. tab-item:: pixi
26+
27+
.. code-block:: bash
28+
29+
pixi init
30+
pixi add manim
31+
2232
2333
Since all dependencies (except LaTeX) are handled by conda, you don't need to worry
2434
about needing to install additional dependencies.
@@ -32,11 +42,8 @@ In order to make use of Manim's interface to LaTeX to, for example, render
3242
equations, LaTeX has to be installed as well. Note that this is an optional
3343
dependency: if you don't intend to use LaTeX, you don't have to install it.
3444

35-
You can install LaTeX by following the optional dependencies steps
36-
for :ref:`Windows <win-optional-dependencies>`,
37-
:ref:`Linux <linux-optional-dependencies>` or
38-
:ref:`macOS <macos-optional-dependencies>`.
39-
45+
Recommendations on how to install LaTeX on different operating systems
46+
can be found :doc:`in our local installation guide </installation/uv>`.
4047

4148

4249
Working with Manim

docs/source/installation/linux.rst

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)