Install & Compatibility
Where this runs
tested against v5.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.3s · import 0.026s · 85MB
83MB installed
● package 83MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
feaLib
✓ from fontTools.feaLib import *
✗ from afdko.feaLib import *
feaLib is part of fonttools, not directly in afdko. AFDKO uses fonttools internally.
build
✓ from fontTools import ttx
✗ from afdko import build
The build function is in fontTools.TTX or fontTools.varLib. afdko provides command-line scripts, not a Python build function.
Quick example using fontTools feaLib (distributed with afdko but imported from fontTools).
# AFDKO is primarily used via command-line tools.
# To compile OpenType feature code, use the makeotf command after installing.
# In Python, you typically use fontTools:
from fontTools.feaLib.builder import addOpenTypeFeaturesFromString
from fontTools.ttLib import TTFont
# Load a font, add features, save
font = TTFont('input.ttf')
features = """
feature liga {
sub f i by f_i;
} liga;
"""
addOpenTypeFeaturesFromString(font, features)
font.save('output.ttf')
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'afdko.feaLib'
Trying to import feaLib from afdko instead of fontTools.
fixUse `from fontTools.feaLib import builder` instead.
AttributeError: module 'fontTools' has no attribute 'afdko'
Mistakenly trying to access afdko as a submodule of fontTools.
fixAFDKO is a separate package. Import fontTools directly for font operations.
OSError: [Errno 8] Exec format error: '/path/to/makeotf'
The makeotf binary is not executable or not present (common on Windows or when installing via pip without build tools).
fixEnsure you have compiled AFDKO binaries. On Windows, consider using WSL or precompiled binaries from GitHub releases.
Upgrade
Version history
5.0.1latest on PyPI · released May 18, 2026
Audit
Dependencies
No dependency data recorded yet.