--- id: scann version: "1.4.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # scann — Scalable Nearest Neighbor search library License: permissive · Maintenance: active · Downloads: 679.8K/mo ## What it is and what it does ScaNN is a research-grade library for fast approximate nearest neighbor search on large vector datasets. It implements techniques for search space pruning and vector quantization to accelerate similarity lookups while trading off recall for speed. The library is optimized for x86 processors with AVX support and provides both Python and TensorFlow APIs, with the core Python bindings available by default and TensorFlow ops available as an optional extra. The package depends on numpy for array handling and protobuf for serialization. It is designed for machine learning workflows where you need to find similar embeddings or vectors quickly—typical use cases include semantic search, recommendation systems, and clustering. Installation requires Linux with glibc 2.27 or later and Python 3.9–3.13; the compiled wheels are pre-built for common architectures, avoiding the need to compile from source in most cases. Use it for: - Semantic search over document embeddings or text representations to find similar content quickly - Recommendation systems that retrieve similar items based on learned vector representations - Large-scale clustering or nearest-neighbor analysis on high-dimensional datasets - Real-time similarity lookup in machine learning inference pipelines - Embedding-based retrieval for information retrieval or question-answering systems ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. ScaNN performs efficient vector similarity search at scale using search space pruning and quantization, supporting multiple distance functions including inner product and Euclidean distance. Yes, if you need fast approximate nearest neighbor search on Linux with Python 3.9–3.13 and have x86 or ARM hardware with the required instruction sets. The library is actively maintained, has no known vulnerabilities, and is well-suited for production recommendation and search workloads. Install friction is moderate due to compiled dependencies, but pre-built wheels mitigate build complexity. Not suitable for Windows or macOS without additional setup. ## Install pip install scann uv add scann poetry add scann ## Installing scann Before you install: Medium friction due to compiled wheels requiring specific CPU instruction sets (AVX and FMA for x86, NEON for ARM) and glibc version 2.27 or later. Actively maintained with recent releases; supports Python 3.9–3.13 on Linux. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; attribution required. Quickstart: pip install scann import scann # Build index from numpy array of vectors builder = scann.scann_ops_pybind.builder(data, num_leaves=100, leaves_to_search=10) index = builder.build() # Search for nearest neighbors neighbors, distances = index.search(query_vector, k=10) Requires x86 processors with AVX and FMA support (or ARM with NEON); libstdc++ version 3.4.23 or above must be installed on the system. Verify before relying: - Exact performance metrics on ann-benchmarks.com for glove-100-angular dataset mentioned in description - Whether TensorFlow integration (scann[tf]) is necessary for typical use cases or only for SavedModel embedding - Memory overhead and scaling characteristics for datasets larger than those in published benchmarks ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 679.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags vector similarity search, nearest neighbor search, approximate nearest neighbors, vector quantization, large-scale similarity, ann library, embedding search, vector-search, approximate-nearest-neighbors, ml-infrastructure [View on SkillFed](https://skillfed.io/packages/scann) · [View on PyPI](https://pypi.org/project/scann/)