Install & Compatibility
Where this runs
tested against v9.4.0 · 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
py 3.10
✕ build_error
✓ 14.1s
py 3.11
✕ build_error
✓ 13.9s
py 3.12
✕ build_error
✓ 12.7s
py 3.13
✕ build_error
✓ 12.1s
151MB installed
● package 151MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Capabilities
✓ from capa.main import Capabilities
✗ import capa
Top-level import does not expose Capabilities class
get_meta
✓ from capa.engine import get_meta
✗ from capa import get_meta
get_meta is in the engine submodule
Basic usage to identify capabilities in an executable file. Ensure rules are extracted or downloaded separately.
import os
import json
from capa.main import Capabilities
from capa.engine import get_meta
rules_path = os.environ.get('CAPA_RULES_PATH', '/path/to/rules')
with open('sample.exe', 'rb') as f:
buf = f.read()
capa = Capabilities.get_capabilities(buf, rtype='pe', backend='vivisect', rulesdir=rules_path, signatures='auto')
meta = get_meta(buf)
print(json.dumps(capa, indent=2))
print(json.dumps(meta, indent=2))
capa --version
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'vivisect'
vivisect is not installed or not compatible with the platform.
fixpip install vivisect (Windows/Linux only). For macOS, use Docker.
FileNotFoundError: [Errno 2] No such file or directory: 'rules/...'
CAPA rules directory not provided or not found.
fixDownload capa-rules and set CAPA_RULES_PATH or pass the 'rules' parameter.
Upgrade
Version history
9.4.0latest on PyPI · released Apr 1, 2026
Audit
Dependencies
vivisectrequiredRequired for analysis of executable formats