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
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.fixEnsure 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.fixAlways 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.fixConsult 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()`.fixAfter `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.fixAfter 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.fixFor 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.