Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Transferred troubleshooting installation related snippets from Discord to the documentation (#2130)

Anima4ff2cbec1a78
diff --git a/docs/source/installation/troubleshooting.rst b/docs/source/installation/troubleshooting.rst
index 15d4bd47f..81db753ec 100644
--- a/docs/source/installation/troubleshooting.rst
+++ b/docs/source/installation/troubleshooting.rst
@@ -182,3 +182,118 @@ operating system's documentation to find out where you can get it and how you
have to install it.
If you are unable to solve your problem, check out the `dvisvgm FAQ <https://dvisvgm.de/FAQ/>`_.
+
+(Windows) ``Python is not recognized as an internal or external command, operable program or batch file.``
+----------------------------------------------------------------------------------------------------------
+
+To fix this, you need to add the Python executable to your ``PATH`` environment variable.
+Follow the steps in `this StackExchange answer <https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path/143121#143121>`__.
+
+``choco install manimce`` failed
+--------------------------------
+
+If ``choco install manimce`` failed,
+it is likely being caused by Python not being added to your ``PATH`` variable properly.
+Try running the following commands in your terminal:
+
+1. ``py --version``
+2. ``python --version``
+3. ``py3 --version``
+4. ``python3 --version``
+
+Minimally, ``py --version`` and ``python --version`` should return a version.
+If none of these commands are recognized,
+this means that Python was installed on your system, but was not added to PATH.
+See above for directions to add it to your PATH variable.
+
+If any of these commands opens up the Windows store,
+this is likely interfering with the process.
+This is because Chocolatey runs a command that calls python or python3,
+and opening up the Windows store is not the expected behavior.
+See below to fix aliases.
+
+(Windows) Fix Aliases
+---------------------
+
+1. Go to the Windows Settings.
+2. Under Apps and Features, there are an application execution aliases.
+3. Within this menu disable the alias(es) that is causing the issue (``python`` and/or ``python3``).
+
+``IndexError: List index out of range``
+--------
+
+Did you install LaTeX using MiKTeX? If so, open the MiKTeX console,
+install the ``cm-super`` package, then delete the ``media`` directory and
+try to render the scene again.
+
+Config
+------
+
+We've dropped the use of CONFIG in the
+Community Version :doc:`version 0.2.0<../changelog/0.2.0-changelog>`, released in January 2021.
+This means parameters that were previously specified in the
+CONFIG dictionary should now be passed directly into the constructor.
+Practically, this means that old constructions like:
+
+.. code-block:: python
+
+ class SomeMobject(Thing):
+ CONFIG = {
+ "stroke_color": RED,
+ "fill_opacity": 0.7,
+ "radius": 3,
+ "my_awesome_property": 42,
+ }
+ # add methods here
+
+should now be defined like:
+
+.. code-block:: python
+
+ class SomeMobject(VMobject):
+ def __init__(
+ self,
+ stroke_color=RED,
+ fill_opacity=0.7,
+ radius=3,
+ my_awesome_property=42,
+ **kwargs
+ ):
+ self.radius = 3
+ self.my_awesome_property = 42
+ super().__init__(
+ stroke_color=stroke_color, fill_opacity=fill_opacity, **kwargs
+ ) # passing arguments into the parent class
+ # add methods here
+
+For scenes, this is even easier:
+
+.. code-block:: python
+
+ class Test(Scene):
+ CONFIG = {"a": 1, "b": 2}
+
+becomes:
+
+.. code-block:: python
+
+ class Test(Scene):
+ def construct(self):
+ self.a = 1
+ self.b = 2
+
+A python command does not work
+------------------------------
+
+If a python command does not work,
+try adding ``python -m`` in front of it.
+For example, if ``pip install manim`` does not work, you can try ``python -m pip install manim``.
+
+undefined symbol
+----------------
+
+If you are using anaconda, run the following command:
+
+.. code-block:: bash
+
+ conda install -c conda-forge pycairo