> ## Documentation Index
> Fetch the complete documentation index at: https://manimvtk.mathify.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation Guide

> Detailed installation instructions for all platforms

## System Requirements

<CardGroup cols={2}>
  <Card title="Python Version" icon="python">
    Python 3.9 or higher required
  </Card>

  <Card title="Operating Systems" icon="desktop">
    Windows, macOS, Linux (all supported)
  </Card>

  <Card title="Storage" icon="hard-drive">
    \~500MB for basic installation
  </Card>

  <Card title="RAM" icon="memory">
    4GB minimum, 8GB recommended
  </Card>
</CardGroup>

## Prerequisites by Platform

### Linux

ManimVTK requires system-level dependencies on Linux for text rendering (ManimPango).

<Tabs>
  <Tab title="Google Colab (Recommended)">
    ```bash theme={null}
      !sudo apt update
      !sudo apt install libcairo2-dev \
          # optional dependencies for full LaTeX support
          # texlive texlive-latex-extra texlive-fonts-extra \
          # texlive-latex-recommended texlive-science \
          tipa libpango1.0-dev
      !pip install IPython==8.21.0
    ```
  </Tab>

  <Tab title="Debian/Ubuntu">
    ```bash theme={null}
    sudo apt update
    sudo apt install libpango1.0-dev pkg-config python3-dev
    ```

    **Tested on:**

    * Ubuntu 20.04, 22.04, 24.04
    * Debian 11, 12
    * Google Colab
  </Tab>

  {" "}

  <Tab title="Fedora">
    `bash sudo dnf install pango-devel pkg-config python3-devel ` **Tested
    on:** - Fedora 38, 39, 40
  </Tab>

  {" "}

  <Tab title="Arch Linux">
    `bash sudo pacman -S pango pkgconf ` **Tested on:** - Arch Linux (rolling
    release) - Manjaro
  </Tab>

  <Tab title="Other Distributions">
    Install the following packages using your distribution's package manager:

    * Pango development files (`libpango1.0-dev` or `pango-devel`)
    * pkg-config
    * Python development headers
  </Tab>
</Tabs>

<Note>
  **Linux headless environments:** For rendering on servers without a display,
  you'll need `xvfb`: `bash sudo apt install xvfb # Debian/Ubuntu sudo dnf
      install xorg-x11-server-Xvfb # Fedora `
</Note>

### macOS

No additional system dependencies required! Python 3.9+ is sufficient.

```bash theme={null}
# Verify Python version
python3 --version
```

### Windows

No additional system dependencies required! Python 3.9+ is sufficient.

<Tip>
  **Windows users:** We recommend using Windows Terminal for the best CLI
  experience
</Tip>

## Installation Methods

### Method 1: From PyPI (Recommended)

Install the latest stable release from the Python Package Index:

<Tabs>
  <Tab title="Basic Installation">
    ```bash theme={null}
    pip install manimvtk[vtk]
    ```

    This includes:

    * Core ManimVTK functionality
    * VTK rendering and export
    * All standard dependencies
  </Tab>

  {" "}

  <Tab title="Scientific Stack">
    `bash pip install manimvtk[scientific] ` Includes everything from basic
    installation plus: - PyVista (advanced VTK visualization) - Additional
    scientific computing tools
  </Tab>

  <Tab title="Development Installation">
    ```bash theme={null}
    pip install manimvtk[dev]
    ```

    Includes all dependencies plus:

    * Testing frameworks (pytest)
    * Linting tools (flake8, black)
    * Documentation tools
  </Tab>
</Tabs>

### Method 2: From Source

For development or the latest unreleased features:

```bash theme={null}
# Clone the repository
git clone https://github.com/mathifylabs/manimVTK.git
cd manimVTK

# Install in editable mode with VTK support
pip install -e ".[vtk]"

# Or with all extras for development
pip install -e ".[vtk,dev]"
```

<Check>
  **Editable mode** (`-e`) allows you to modify the source code and see changes
  immediately without reinstalling
</Check>

## Verify Installation

After installation, verify that ManimVTK is working correctly:

```bash theme={null}
# Check version
manimvtk --version

# Should output something like: ManimVTK 0.19.0
```

### Test Rendering

Create a test file `test.py`:

```python theme={null}
from manimvtk import *

class Test(Scene):
    def construct(self):
        circle = Circle()
        self.play(Create(circle))
```

Render it:

```bash theme={null}
manimvtk -pql test.py Test
```

<Check>If a video file opens, your installation is working correctly!</Check>

### Test VTK Export

Test VTK functionality:

```bash theme={null}
manimvtk -ql test.py Test --vtk-export
```

Check for VTK output:

```bash theme={null}
ls media/vtk/Test/
# Should show: Test_final.vtp
```

## Troubleshooting

<AccordionGroup>
  <Accordion icon="triangle-exclamation" title="ImportError: No module named 'manimpango'">
    This means ManimPango failed to install, usually due to missing system dependencies.

    **Solution:**

    1. Install system dependencies (see Prerequisites section above)
    2. Reinstall: `pip install --force-reinstall manimpango`
  </Accordion>

  {" "}

  <Accordion icon="triangle-exclamation" title="ModuleNotFoundError: No module named 'vtk'">
    VTK was not installed or the installation failed. **Solution:** `bash pip
          install vtk # Or reinstall with VTK extras pip install --force-reinstall
          manimvtk[vtk] `
  </Accordion>

  {" "}

  <Accordion icon="triangle-exclamation" title="OpenGL errors on Linux">
    This occurs in headless environments (servers without display). **Solution:**

    ````bash # Install xvfb sudo apt install xvfb # Run with xvfb wrapper xvfb-run theme={null}
    -a manimvtk -pql example.py Scene ```
    </Accordion>

    {" "}

    <Accordion icon="triangle-exclamation" title="Permission denied errors">
    You may need to use `--user` flag or a virtual environment. **Solution:**
    ```bash # Option 1: Install for current user only pip install --user
    manimvtk[vtk] # Option 2: Use a virtual environment (recommended) python -m
    venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip
    install manimvtk[vtk] ```
    </Accordion>

    <Accordion icon="triangle-exclamation" title="FFmpeg not found">
      ManimVTK uses FFmpeg for video encoding.
      
      **Solution:**
      ```bash
      # Ubuntu/Debian
      sudo apt install ffmpeg
      
      # macOS
      brew install ffmpeg
      
      # Windows
      # Download from https://ffmpeg.org/download.html
      # Add to PATH
    ````
  </Accordion>
</AccordionGroup>

## Virtual Environments (Recommended)

Using virtual environments helps avoid dependency conflicts:

<Tabs>
  <Tab title="venv (Built-in)">
    ```bash theme={null}
    # Create virtual environment
    python -m venv manimvtk-env

    # Activate (Linux/macOS)
    source manimvtk-env/bin/activate

    # Activate (Windows)
    manimvtk-env\Scripts\activate

    # Install ManimVTK
    pip install manimvtk[vtk]
    ```
  </Tab>

  {" "}

  <Tab title="conda">
    ````bash # Create conda environment conda create -n manimvtk python=3.11 conda theme={null}
    activate manimvtk # Install ManimVTK pip install manimvtk[vtk] ```
    </Tab>

    <Tab title="uv (Fast)">
      ```bash
      # Install uv (if not already installed)
      pip install uv
      
      # Create environment and install
      uv venv
      source .venv/bin/activate  # or .venv\Scripts\activate on Windows
      uv pip install manimvtk[vtk]
    ````
  </Tab>
</Tabs>

## Updating ManimVTK

Keep your installation up to date:

```bash theme={null}
# Update to latest version
pip install --upgrade manimvtk[vtk]

# Update from source
cd manimVTK
git pull
pip install -e ".[vtk]"
```

## Optional Dependencies

Additional packages you might want to install:

```bash theme={null}
# For advanced VTK visualization
pip install pyvista

# For Jupyter notebook support
pip install jupyter ipywidgets

# For 3D file export
pip install trimesh

# For advanced plotting
pip install matplotlib
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Quick Start Guide" icon="rocket" href="/quickstart">
    Create your first animation
  </Card>

  {" "}

  <Card title="VTK Features" icon="cube" href="/vtk/overview">
    Learn about VTK capabilities
  </Card>

  {" "}

  <Card title="Examples" icon="play" href="/examples/basic-2d">
    Browse example scenes
  </Card>

  <Card title="Configuration" icon="gear" href="/advanced/configuration">
    Customize ManimVTK settings
  </Card>
</CardGroup>
