#4963·manim

manim.cfg reading not working as expected

Author: 0x00clCreated Aug 25, 2026Updated Sep 1, 2026

Description of bug / unexpected behavior

According to the documentation in here https://docs.manim.community/en/stable/guides/configuration.html#the-config-files it says:

To use a local configuration file when rendering your scene, you must create a file with the name manim.cfg in the same directory as your scene code. ... Manim will look for a manim.cfg config file in the same directory as the file being rendered, and not in the directory of execution. For example, ... It will not use the config file found in the current working directory, even if it exists. In this way, the user may keep different config files for different scenes or projects, and execute them with the right configuration from anywhere in the system.

When I put manim.cfg next to my .py file and I render it from outside the folder where .py and manim.cfg are, manim will not use the configuration file that is in the same directory as the .py file being rendered.

In fact I tested it, and manim will use the configuration from the current working directory from where you are rendering instead of the one next to the .py file.

bash
# Renders without using manim.cfg at `~/MyAnimations/src/myanimations/manim.cfg`
~/MyAnimations $ uv run manim src/myanimation/animation1.py

# Moving manim.cfg to the current working directory
~/MyAnimations $ mv src/myanimation/manim.cfg .

# Renders reading the manim.cfg at the current working directory (`~/MyAnimations/manim.cfg`)
~/MyAnimations $ uv run manim src/myanimation/animation1.py

Expected behavior

I was expecting that when I render an animation such as manim render src/myanimation/animation1.py animation it would by default use the config file in src/myanimation/manim.cfg.

How to reproduce the issue

I'm using uv 0.12.5 to create a folder with a project (uv init MyAnimations) then add manim to the dependencies (uv add manim) and create animation1.py inside the MyAnimations/src/myanimations, the project tree should look like this:

MyAnimations/
├── pyproject.toml
├── README.md
├── src
│   └── myanimations
│       ├── animation1.py
│       ├── __init__.py
│       └── manim.cfg
└── uv.lock

manim.cfg should look like this

[CLI]
background_color = RED

and animation1.py (From the tutorial from the docs)

python
from manim import *

class animation(Scene):
    def construct(self):
        circle = Circle()
        circle.set_fill(PINK, opacity=0.5)
        self.play(Create(circle))
  • Render while standing in ~/MyAnimations/ with uv run manim src/myanimations/animation1.py animation. The rendered video will not have a red background as declared by the manim.cfg
  • Change directory (cd src/myanimations) and then render it uv run manim animation1.py animation it will read the manim.cfg file and the background of the render will be red.

Logs

Terminal output
[08/25/26 14:53:16] DEBUG    Hashing ...                                                                                                                                  hashing.py:443
                    DEBUG    Hashing done in 0.000981 s.                                                                                                                  hashing.py:462
                    DEBUG    Hash generated :  819936691_1235583568_223132457                                                                                             hashing.py:463
                    INFO     Animation 0 : Using cached data (hash : 819936691_1235583568_223132457)                                                                cairo_renderer.py:92
                    DEBUG    List of the first few animation hashes of the scene: ['819936691_1235583568_223132457']                                               cairo_renderer.py:101
                    INFO     Combining to Movie file.                                                                                                           scene_file_writer.py:952
                    DEBUG    Partial movie files to combine (1 files):                                                                                          scene_file_writer.py:834
                             ['/home/user/MyAnimations/media/videos/animation1/1080p60/partial_movie_files/animation/819936691_1235583568_223132457.mp4']                              
                    INFO                                                                                                                                       scene_file_writer.py:1103
                             File ready at '/home/user/MyAnimations/media/videos/animation1/1080p60/animation.mp4'                                                                     
                                                                                                                                                                                        
                    INFO     Rendered animation                                                                                                                             scene.py:290
                             Played 1 animations                                                                                                                                        

System specifications

System Details
  • OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): Fedora 44
  • Python version (python/py/python3 --version): 3.13.13
  • Installed modules (provide output from pip list):
List of packages from `uv tree`
Resolved 38 packages in 0.61ms
myanimations v0.1.0
└── manim v0.21.0
    ├── audioop-lts v0.2.2
    ├── av v18.1.0
    ├── beautifulsoup4 v4.15.0
    │   ├── soupsieve v2.9.2
    │   └── typing-extensions v4.16.0
    ├── click v8.4.2
    ├── cloup v3.1.0
    │   └── click v8.4.2
    ├── decorator v5.3.1
    ├── isosurfaces v0.1.2
    │   └── numpy v2.5.2
    ├── manimpango v0.6.1
    ├── mapbox-earcut v2.0.0
    │   └── numpy v2.5.2
    ├── moderngl v5.12.0
    │   └── glcontext v3.0.0
    ├── moderngl-window v3.1.1
    │   ├── moderngl v5.12.0 (*)
    │   ├── numpy v2.5.2
    │   ├── pillow v12.3.0
    │   ├── pyglet v2.1.16
    │   └── pyglm v2.8.3
    ├── networkx v3.6.1
    ├── numpy v2.5.2
    ├── pillow v12.3.0
    ├── pycairo v1.29.1
    ├── pydub v0.25.1
    ├── pygments v2.21.0
    ├── rich v15.0.0
    │   ├── markdown-it-py v4.2.0
    │   │   └── mdurl v0.1.2
    │   └── pygments v2.21.0
    ├── scipy v1.18.1
    │   └── numpy v2.5.2
    ├── screeninfo v0.8.1
    ├── skia-pathops v0.9.2
    ├── srt v3.5.3
    ├── svgelements v1.9.6
    ├── tqdm v4.70.0
    ├── typing-extensions v4.16.0
    └── watchdog v6.0.0
(*) Package tree already displayed