pynndescent
Nearest Neighbor Descent
Decision gist · record as of 2026-08-14
Yes. PyNNDescent is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive BSD-2-Clause license. It solves a well-defined problem with broad metric support and scikit-learn integration. Suitable for production use in recommendation systems, similarity search, and machine learning pipelines.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with five runtime dependencies (scikit-learn, scipy, numba, llvmlite, joblib) that are standard in scientific Python.
- Last release 218 days ago with active repository maintenance and 969 stars.
License · maintenance · safety
BSD-2-Clause (permissive) — BSD-2-Clause permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-01-08 (218 days) · last repo commit 2026-08-01 · 969 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,964,792 downloads/mo, #1,804 on PyPI
Alternatives
Verify before relying
pip install pynndescent
from pynndescent import NNDescent
index = NNDescent(data)
index.query(query_data, k=15)- Whether the 80%-100% accuracy rate claim applies to all distance metrics or only specific ones
- Performance comparison details with other ANN libraries beyond the ann-benchmarks reference
What it is and what it does
PyNNDescent is a Python library for building approximate nearest neighbor (ANN) search indexes using the nearest neighbor descent algorithm, supplemented with random projection trees for initialization. It supports a large variety of distance metrics including euclidean, manhattan, cosine, hamming, wasserstein, and many others, as well as custom user-defined metrics.
The library provides a simple two-operation interface: construct an index from training data, then query it for the k nearest neighbors of new points. It integrates with scikit-learn and can serve as a drop-in replacement for KNeighborTransformer in algorithms that use nearest neighbor computations. The implementation relies on numba for JIT compilation and joblib for parallelization.
Use it for
- Build a searchable index for similarity-based recommendation systems or content retrieval
- Perform fast approximate k-nearest neighbor queries on high-dimensional embeddings or feature vectors
- Integrate nearest neighbor search into scikit-learn pipelines as a preprocessing or feature transformation step
- Find similar items across different distance metrics (e.g., cosine for text embeddings, euclidean for image features)
- Construct k-neighbor graphs for clustering, graph-based learning, or dimensionality reduction algorithms
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyNNDescent is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive BSD-2-Clause license. It solves a well-defined problem with broad metric support and scikit-learn integration. Suitable for production use in recommendation systems, similarity search, and machine learning pipelines.
Install
pynndescent on PyPI
Before you install
Low friction: pure Python wheel with five runtime dependencies (scikit-learn, scipy, numba, llvmlite, joblib) that are standard in scientific Python. Last release 218 days ago with active repository maintenance and 969 stars.
License in practice
BSD-2-Clause permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install pynndescent
from pynndescent import NNDescent
index = NNDescent(data)
index.query(query_data, k=15)
Verify before relying
- Whether the 80%-100% accuracy rate claim applies to all distance metrics or only specific ones
- Performance comparison details with other ANN libraries beyond the ann-benchmarks reference
Package facts
| License | BSD-2-Clause permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesscikit-learnscipynumballvmlitejoblib |
| Maintenance | Actively maintained 218 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,964,792 / month, #1,804 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/EngineeringTopic :: Software Development |
Evidence: pynndescent-0.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “approximate nearest neighbor search”
- pynndescentPyNNDescent builds approximate nearest neighbor search indexes using…
- cuvs-cu12Provides GPU-accelerated approximate nearest neighbor search and…
- nmslibnmslib provides efficient similarity search in metric and non-metric…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also annoy · pyspark-hnsw · rtree · nmslib · scann · cuvs-cu12 · libcuvs-cu12 · missingpy · kdtree · voyager