Skip to content

Install System Dependencies

Install the required (and optional) system dependencies for keyed-extras.

Dependency Required for Installation Priority
Cairo Core rendering functionality Required
FFmpeg Faster video rendering Recommended
Pango Rich text formatting Optional
librsvg SVG rendering Optional

Choose the method that works best for your system:

conda (platform-agnostic)

Create an environment.yml file

environment.yml
name: keyed
channels:
- conda-forge
- nodefaults
dependencies:
- python<3.13,>=3.11
- ffmpeg
- cairo
- pycairo
- pango>=1.56.0
- pygobject
- librsvg
- pip
- pip:
    - --index-url https://pkgs.keyed.dev/simple
    - --extra-index-url https://pypi.org/simple
    - keyed-extras[login,previewer]>=0.1.3

Create and activate the environment:

conda env create -f environment.yml
conda activate keyed

Note

This handles installing both the system dependencies and keyed and keyed-extras, so if you used this approach you're done! Check out the example gallery to get started.

Ubuntu/Debian

sudo apt-get update && sudo apt-get install -y \
    # Required dependencies
    libcairo2-dev \
    pkg-config \
    python3-dev \
    gcc \
    # Optional but recommended dependencies
    ffmpeg \              # Enables faster ffmpeg-based rendering
    libpango1.0-dev \     # Enables the RichText object
    librsvg2-dev          # Enables the SVG object for rendering SVG files

macOS

brew install cairo ffmpeg pango librsvg

Fedora

sudo dnf install cairo-devel pkg-config python3-devel ffmpeg pango-devel librsvg2-devel

Arch Linux

sudo pacman -S cairo pkgconf ffmpeg pango librsvg

Windows (use conda instead)

Windows support is entirely untested!

Until wonderful people like you contribute and test more robust installation instructions, I recommend using the conda installation instructions instead.

  1. Install MSYS2
  2. Open MSYS2 MinGW 64-bit terminal and run:

    pacman -S mingw-w64-x86_64-cairo mingw-w64-x86_64-pango mingw-w64-x86_64-gtk3 mingw-w64-x86_64-librsvg
    
  3. Add the MSYS2 bin directory to your PATH (typically C:\msys64\mingw64\bin)

  4. Download and install FFmpeg for Windows