Registry / ai-ml / spacy
library3.8.16pypypi✓ verified 25d ago

spaCy is an open-source library for advanced Natural Language Processing (NLP) in Python and Cython. It's designed for industrial-strength production use, providing efficient processing of large volumes of text and featuring state-of-the-art neural network models for tasks like tagging, parsing, and named entity recognition. Currently at version 3.8.13, spaCy maintains an active development cycle with frequent releases addressing compatibility, performance, and new features.

pip install spacy
INSTALL
IMPORT
SIG · SPACY
S
spacy
ai-mlpythonv3.8.16
Install
13.2s avg
Import
2725ms
Disk
305MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.8.16 · 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
musl
glibc
py 3.10
✓ —
✓ 14.3s
py 3.11
✓ —
✓ 12.6s
py 3.12
✓ —
✓ 13.8s
py 3.13
✓ —
✓ 12.1s
py 3.9
✕ build_error
✕ build_error
305MB installed
● package 305MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

spacy
import spacy
import spacy

This quickstart demonstrates how to load a pre-trained English language model and use it to process text. It shows tokenization, lemmatization, part-of-speech tagging, dependency parsing, and named entity recognition. Remember that models must be downloaded separately after installing the spaCy library.

import spacy # Load a pre-trained English pipeline # Make sure to run `python -m spacy download en_core_web_sm` first nlp = spacy.load("en_core_web_sm") # Process a text doc = nlp("Apple is looking at buying U.K. startup for $1 billion.") # Iterate over tokens for token in doc: print(f"{token.text:<15} {token.lemma_:<10} {token.pos_:<10} {token.dep_:<10} {token.ent_type_:<10}") # Access named entities print("\nNamed Entities:") for ent in doc.ents: print(f"{ent.text} ({ent.label_})")
spacy --version
Debug
Known issues
breakingPython version support changes frequently. For example, spaCy v3.8.8 dropped Python 3.9 support, v3.7 dropped 3.6, while later 3.8.x versions added 3.14 support. Always check `requires_python` for your specific spaCy version.
fix
Ensure your Python environment meets the `requires_python` specification for your installed spaCy version. Upgrade or downgrade Python if necessary.
affects: 3.x
breakingMigration from Pydantic v1 to v2 caused issues with model loading in older v3.8.x releases (e.g., v3.8.12). This was due to changes in how `confection` and `Thinc` handled dependency validation. While patched in v3.8.13, similar deep dependency incompatibilities can recur.
fix
Always install the latest patch release (e.g., 3.8.13 for the Pydantic v2 issue). Pin major dependency versions (e.g., Pydantic) to avoid unexpected upgrades, or upgrade spaCy and all its dependencies in a clean virtual environment.
affects: 3.8.x (specifically before 3.8.13 for Pydantic v2 transition)
breakingUpgrading from spaCy v2.x to v3.x involves significant API changes, including the configuration system, pipeline architecture, and how models are trained. Existing custom components and trained models will likely require migration.
fix
Consult the official spaCy v2.x to v3.x migration guide. Retrain custom models with the new spaCy version and update code to use the new API and configuration patterns.
affects: 2.x to 3.x
gotchaTrained models are separate Python packages that must be downloaded after the core spaCy library is installed. Forgetting to download a model (e.g., `en_core_web_sm`) will result in `OSError: [E050] Can't find model` errors when calling `spacy.load()`.
fix
After `pip install spacy`, always run `python -m spacy download [model_name]` for the models you intend to use (e.g., `en_core_web_sm`).
affects: All versions
gotchaInstalled spaCy models must be compatible with your spaCy library version. Incompatible models can lead to unexpected errors or incorrect behavior.
fix
After upgrading spaCy, run `python -m spacy validate` to check compatibility of installed models and get recommendations for updates. Retrain any custom models.
affects: All versions
deprecatedThe `spacy project` functionality was moved into a new standalone library called `Weasel` in spaCy v3.7. While `spacy project` commands still work, some spaCy-specific configuration keys (`spacy_version`, `check_requirements`) are deprecated.
fix
For new projects, consider using `Weasel` directly if applicable. Update project configuration files to use `WEASEL_CONFIG_OVERRIDES` instead of `SPACY_CONFIG_OVERRIDES` for environment variables.
affects: 3.7+
Upgrade
Version history
3.8.16latest on PyPI · released Aug 24, 2026
Audit
Dependencies
thincrequiredMachine learning library backend for spaCy's models.
confectionrequiredConfiguration system for spaCy and Thinc.
pydanticrequiredData validation, integrated through confection's custom validation logic for v2 compatibility.
typer-slimrequiredCommand-line interface (CLI) argument parsing.
numpyrequiredCore library for numerical operations, used extensively by Thinc and spaCy's models.
Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources