From a5b12685698babc07de82a5e970ce3b786da128d Mon Sep 17 00:00:00 2001 From: JasonGrace2282 Date: Mon, 2 Sep 2024 16:04:41 -0400 Subject: [PATCH] Rewrite installation instructions --- docs/source/faq/installation.md | 1 + docs/source/installation.rst | 22 ++++-- docs/source/installation/linux.rst | 19 +++-- docs/source/installation/locally.rst | 109 +++++++++++++++++++++++++++ docs/source/installation/macos.rst | 33 +------- docs/source/installation/windows.rst | 64 +--------------- 6 files changed, 145 insertions(+), 103 deletions(-) create mode 100644 docs/source/installation/locally.rst diff --git a/docs/source/faq/installation.md b/docs/source/faq/installation.md index c60044b66a..4d89e315aa 100644 --- a/docs/source/faq/installation.md +++ b/docs/source/faq/installation.md @@ -120,6 +120,7 @@ of [ManimPango's README](https://github.com/ManimCommunity/ManimPango). --- +(not-on-path)= ## I am using Windows and get the error `X is not recognized as an internal or external command, operable program or batch file` Regardless of whether `X` says `python` or `manim`, this means that the executable you diff --git a/docs/source/installation.rst b/docs/source/installation.rst index fbc65a7cc6..7672f4a548 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -65,8 +65,7 @@ Manim is a Python library, and it can be installed via `pip `__ or `conda `__. However, in order for Manim to work properly, some additional system -dependencies need to be installed first. The following pages have -operating system specific instructions for you to follow. +dependencies need to be installed first. Manim requires Python version ``3.9`` or above to run. @@ -80,12 +79,23 @@ Manim requires Python version ``3.9`` or above to run. Discussion `directly on GitHub `__. + +To install Manim locally, check out the following pages. Note +that the process for Linux is slightly different - if you're +on Linux please follow the instructions in the `Linux section `_. + .. toctree:: - :maxdepth: 2 + :maxdepth: 1 + + installation/locally + + +Once you've installed the core dependencies, you can proceed to +install the optional dependencies, depending on your system. - installation/windows - installation/macos - installation/linux +- :doc:`installation/windows` +- :doc:`installation/macos` +- :doc:`installation/linux` Once Manim is installed locally, you can proceed to our :doc:`quickstart guide ` which walks you diff --git a/docs/source/installation/linux.rst b/docs/source/installation/linux.rst index 6c154d8eed..d11f2b80f6 100644 --- a/docs/source/installation/linux.rst +++ b/docs/source/installation/linux.rst @@ -20,7 +20,7 @@ Then, installing Manim is just a matter of running: In light of the current efforts of migrating to rendering via OpenGL, this list might be incomplete. Please `let us know - ` if you + `__ if you ran into missing dependencies while installing. In any case, we have also compiled instructions for several common @@ -29,6 +29,13 @@ combinations of operating systems and package managers below. Required Dependencies --------------------- +.. tip:: + + If you have multiple Python versions installed, you might need to install the python + development headers for the correct version. For example, if you have Python 3.9 installed, + you would need to install python3.9-dev. + + apt – Ubuntu / Mint / Debian **************************** @@ -95,8 +102,7 @@ Cairo and Pango: .. code-block:: bash - sudo pacman -Syu - sudo pacman -S cairo pango + sudo pacman -Syu cairo pango If you don't have ``python-pip`` installed, get it by running: @@ -147,13 +153,12 @@ Should you choose to work with some smaller TeX distribution like of LaTeX packages which Manim interacts with in some way (a subset might be sufficient for your particular application) is:: - collection-basic amsmath babel-english cbfonts-fd cm-super ctex doublestroke - dvisvgm everysel fontspec frcursive fundus-calligra gnu-freefont jknapltx - latex-bin mathastext microtype ms physics preview ragged2e relsize rsfs + amsmath babel-english cbfonts-fd cm-super count1to ctex doublestroke dvisvgm everysel + fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin + mathastext microtype multitoc physics preview prelim2e ragged2e relsize rsfs setspace standalone tipa wasy wasysym xcolor xetex xkeyval - Working with Manim ------------------ diff --git a/docs/source/installation/locally.rst b/docs/source/installation/locally.rst new file mode 100644 index 0000000000..8b0446110f --- /dev/null +++ b/docs/source/installation/locally.rst @@ -0,0 +1,109 @@ +Installing Manim Locally +************************ +For the most part, installing Manim is the same across operating systems. However, +you can take some shortcuts depending on your operating system. + +- MacOS users can use `Homebrew `_ to install Manim - check out the section for :ref:`MacOS`. + + +However, if you don't want to use a package manager, check out the section for :ref:`all operating systems`. + +.. _all_os: + +All Operating Systems +===================== +Manim requires a Python version of at least ``3.9`` to run. +If you're not sure if you have python installed, or want to check +what version of Python you have, try running:: + + python --version + +If it errors out, you most likely don't have Python installed. Otherwise, if your +python version is ``3.9`` or higher, you can proceed to :ref:`installing Manim with Pip`. + +.. hint:: + + On MacOS and some Linux distributions, you may have to use ``python3`` instead of ``python``. + In this document, we will use ``python``, but depending on your operating system you may have to + use ``python3``. + +Installing Python +----------------- +If you don't have Python installed, head over to https://www.python.org, download an installer +for a recent (preferably the latest) version of Python, and follow its instructions to get Python +installed on your system. + +.. note:: + + We have received reports of problems caused by using the version of + Python that can be installed from the Windows Store. At this point, + we recommend staying away from the Windows Store version. Instead, + install Python directly from the `official website `__. + + +After installing Python, running the command:: + + python --version + +Should be successful. If it is not, try checking out :ref:`this FAQ entry`. + +.. _manim_pip: + +Installing Manim +---------------- +At this point, installing manim should be as easy as running:: + + python -m pip install manim + +To confirm Manim is working, you can run:: + + manim --version + + +.. _macos_homebrew: + +MacOS +===== +The easiest way to install Manim on macOS is via the popular `package manager Homebrew `__. +If you want to use Homebrew but do not have it installed yet, please +follow `Homebrew's installation instructions `__. + +.. note:: + + For a while after Apple released its new ARM-based processors (the Apple Silicon chips like the *"M1 chip"*), + the recommended way of installing Manim relied on *Rosetta*, Apple's compatibility + layer between Intel and ARM architectures. This is no longer necessary, Manim can + (and is recommended to) be installed natively. + +Manim has a Homebrew formula, so you can just run:: + + brew install manim + +And you should have Manim all installed! Head on over to install the :ref:`optional dependencies`. + + +.. _optional_dependencies: + +Optional Dependencies +===================== +At this point, Manim should be fully working! However, +many Manim objects depend on ``LaTeX``, a math typesetting system. +How to install a texlive distribution varies across operating systems, +so check out the document that matches your operating system below: + +.. toctree:: + :maxdepth: 1 + + windows + macos + linux + +To confirm all dependencies are installed and working, run:: + + manim checkhealth + + +Working with Manim +================== +Head over to our :doc:`Quickstart Tutorial <../tutorials/quickstart>` to learn +how to make your own *Manimations*! diff --git a/docs/source/installation/macos.rst b/docs/source/installation/macos.rst index 1edd21dd5f..d13436be8b 100644 --- a/docs/source/installation/macos.rst +++ b/docs/source/installation/macos.rst @@ -1,31 +1,6 @@ -macOS +MacOS ===== - -For the sake of simplicity, the following instructions assume that you have -the popular `package manager Homebrew `__ installed. While -you can certainly also install all dependencies without it, using Homebrew -makes the process much easier. - -If you want to use Homebrew but do not have it installed yet, please -follow `Homebrew's installation instructions `__. - -.. note:: - - For a while after Apple released its new ARM-based processors (the Apple Silicon chips like the *"M1 chip"*), - the recommended way of installing Manim relied on *Rosetta*, Apple's compatibility - layer between Intel and ARM architectures. This is no longer necessary, Manim can - (and is recommended to) be installed natively. - - -Installing Manim ----------------- - -As of July/2024, brew can install Manim including all required dependencies. -To install Manim: - -.. code-block:: bash - - brew install manim +For installing Manim, please refer to the :doc:`installation instructions <../installation>`. .. _macos-optional-dependencies: @@ -56,9 +31,9 @@ Should you choose to work with some partial TeX distribution, the full list of LaTeX packages which Manim interacts with in some way (a subset might be sufficient for your particular application) is:: - amsmath babel-english cbfonts-fd cm-super ctex doublestroke dvisvgm everysel + amsmath babel-english cbfonts-fd cm-super count1to ctex doublestroke dvisvgm everysel fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin - mathastext microtype ms physics preview ragged2e relsize rsfs + mathastext microtype multitoc physics preview prelim2e ragged2e relsize rsfs setspace standalone tipa wasy wasysym xcolor xetex xkeyval diff --git a/docs/source/installation/windows.rst b/docs/source/installation/windows.rst index 04fe2b735a..7ae12bc033 100644 --- a/docs/source/installation/windows.rst +++ b/docs/source/installation/windows.rst @@ -1,64 +1,6 @@ Windows ======= - -The easiest way of installing Manim and its dependencies is by using a -package manager like `Chocolatey `__ -or `Scoop `__, especially if you need optional dependencies -like LaTeX support. - -If you choose to use one of the package managers, please follow -their installation instructions -(`for Chocolatey `__, -`for Scoop `__) -to make one of them available on your system. - - -Required Dependencies ---------------------- - -Manim requires a recent version of Python (3.9 or above) -in order to work. - -Chocolatey -********** - -Manim can be installed via Chocolatey simply by running: - -.. code-block:: powershell - - choco install manimce - -That's it, no further steps required. You can continue with installing -the :ref:`optional dependencies ` below. - -Pip -*** - -As mentioned above, Manim needs a reasonably recent version of -Python 3 (3.9 or above). - -**Python:** Head over to https://www.python.org, download an installer -for a recent version of Python, and follow its instructions to get Python -installed on your system. - -.. note:: - - We have received reports of problems caused by using the version of - Python that can be installed from the Windows Store. At this point, - we recommend staying away from the Windows Store version. Instead, - install Python directly from the - `official website `__. - -Then, Manim can be installed via Pip simply by running: - -.. code-block:: powershell - - python -m pip install manim - -Manim should now be installed on your system. Continue reading -the :ref:`optional dependencies ` section -below. - +For installing Manim, please refer to the :doc:`installation instructions <../installation>`. .. _win-optional-dependencies: @@ -93,9 +35,9 @@ Therefore we only recommend this option if you know what you are doing. The full list of LaTeX packages which Manim interacts with in some way (a subset might be sufficient for your particular application) are:: - amsmath babel-english cbfonts-fd cm-super ctex doublestroke dvisvgm everysel + amsmath babel-english cbfonts-fd cm-super count1to ctex doublestroke dvisvgm everysel fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin - mathastext microtype ms physics preview ragged2e relsize rsfs + mathastext microtype multitoc physics preview prelim2e ragged2e relsize rsfs setspace standalone tipa wasy wasysym xcolor xetex xkeyval