Installing keyed-extras
¶
keyed-extras
extends the keyed
animation library by providing additional features and capabilities exclusively to GitHub sponsors .
1. Install System Dependencies¶
First, 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:
(Recommended) conda - Any Platform
Create an environment.yml
file:
name: keyed-pypi
channels:
- conda-forge
- nodefaults
dependencies:
- python<3.13,>=3.11
- ffmpeg
- cairo
- pycairo
- pango>=1.56.0
- pygobject
- librsvg
- pip
- pip:
- --extra-index-url https://dougmercer.github.io/keyed-extras-docs/pypi/simple # (1)!
- keyed[previewer]
- keyed-extras>=0.1.0
-
This requires setting up authentication for the
keyed-extras
package registry. Jump to those instructions then come back here.Otherwise, you can comment out this line and the
keyed-extras
line below if you want to use the direct download approach.
After creating your environment.yml file, run:
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
Windows
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.
After, proceed to step 2.
2. Install the keyed-extras
Python Package¶
After installing system dependencies, you need to install the keyed-extras
Python package. Choose one of these methods:
Option A: Package Registry with GitHub Authentication¶
We provide a simple Python package index at https://dougmercer.github.io/keyed-extras-docs/pypi/simple.
This will allow you to use pip
to install the latest version keyed-extras
, like
pip install keyed-extras --extra-index-url https://dougmercer.github.io/keyed-extras-docs/pypi/simple
Authentication Setup¶
Before running this command, you need to set up authentication:
- Ensure you're an active sponsor of
keyed
on GitHub - Create a GitHub Personal Access Token with:
- Resource Owner:
dougmercer-yt
- Repository access: "Only select repositories" (
dougmercer-yt/keyed-extras
) - Permissions: "Contents" (Read-only)
- Create a
.netrc
file in your home directory with:
and give it permissions
Troubleshooting Package Registry Issues
- "Repository not found": Verify you're an active sponsor and have access to
dougmercer-yt/keyed-extras
when logged into GitHub - "401 Unauthorized": Check your GitHub token permissions and
.netrc
file format - If problems persist, try the Direct Download method instead
Option B: Direct Download¶
Each release is available as a Python wheel on the keyed-extras releases page.
- Log into GitHub with your sponsor account
- Visit the releases page
- Download the latest
.whl
file -
Install using pip:
Advantages of Direct Download
- Simpler authentication (just log into GitHub in your browser)
- No need to set up
.netrc
- Save a local copy of the package
Limitations of Direct Download
- Must manually download new versions
- Can't use
pip install --upgrade
for updates