Install & Compatibility
Where this runs
tested against v2.1.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
✓ 3.8s
py 3.11
✕ build_error
✓ 3.7s
py 3.12
✕ build_error
✓ 3.5s
py 3.13
✕ build_error
✕ build_error
106MB installed
● package 106MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Index
✓ from voyager import Index
✗ import voyager.Index
Index is a class in the voyager module, not a submodule.
Space
✓ from voyager import Space
Basic example: create index, add vectors, query nearest neighbors.
import numpy as np
from voyager import Index, Space
# Create an index with L2 distance
index = Index(Space.L2, num_dimensions=3)
# Add items (vectors and optional IDs)
vectors = np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], dtype=np.float32)
index.add_items(vectors, ids=[0, 1])
# Query
query = np.array([1.5, 2.5, 3.5], dtype=np.float32)
distances, ids = index.query(query, k=2)
print(ids) # [0, 1]
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'voyager'
Voyager is not installed or the wrong package name is used.
fixRun 'pip install voyager' (not 'voyager-search' or 'voyager-ann').
TypeError: __init__() got an unexpected keyword argument 'num_dimensions'
Incorrect argument name; constructor expects 'num_dimensions' (old versions used 'd' or 'dimension').
fixUse Index(Space.L2, num_dimensions=3).
AttributeError: module 'voyager' has no attribute 'Index'
Importing from a submodule instead of the top-level package.
fixUse 'from voyager import Index'.
Upgrade
Version history
2.1.0latest on PyPI · released Dec 13, 2024
Audit
Dependencies
numpyrequiredRequired for vector operations