How to Install spacy in Python

v3.8.14 Data & Science Python <3.15,>=3.9 MIT

Industrial-strength Natural Language Processing (NLP) in Python

Install pip install spacy

What is spacy?

Industrial-strength Natural Language Processing (NLP) in Python

spaCy is a library for advanced Natural Language Processing in Python and Cython. It's built on the very latest research, and was designed from day one to be used in real products.

spaCy comes with pretrained pipelines and currently supports tokenization and training for 70+ languages. It features state-of-the-art speed and neural network models for tagging, parsing, named entity recognition, text classification and more, multi-task learning with pretrained transformers like BERT, as well as a production-ready training system and easy model packaging, deployment and workflow management. spaCy is commercial open-source software, released under the MIT license.

💫 Version 3.8 out now! Check out the release notes here.

Quick Start

Minimal example to get started with spacy:

import spacy

print(spacy.__version__)

Installation

pip (standard)

pip install spacy

Virtual environment (recommended)

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install spacy

pip3

pip3 install spacy

conda

conda install -c conda-forge spacy

Poetry

poetry add spacy

Dependencies

Installing spacy will also install these packages:

Verify the Installation

After installing, confirm the package is available:

python -c "import spacy; print(spacy.__version__)"

If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.

Installation Errors

Common errors when installing spacy with pip.

ModuleNotFoundError: No module named 'spacy'

Cause: The package is not installed in the current Python environment.

Fix: Run pip install spacy. If using a virtual environment, ensure it is activated first.

ModuleNotFoundError: No module named 'spacy' (installed but still failing)

Cause: pip installed the package into a different Python than the one running your script.

Fix: Use python -m pip install spacy to install into the interpreter you are running.

ImportError: cannot import name 'X' from 'spacy'

Cause: The function or class does not exist in the installed version.

Fix: Check the version with pip show spacy and upgrade with pip install --upgrade spacy.

pip: command not found

Cause: pip is not in PATH or Python was not added to PATH during installation.

Fix: Try python -m pip install spacy. On macOS/Linux try pip3.

PermissionError: [Errno 13] Permission denied

Cause: No write access to the system Python package directory.

Fix: Use a virtual environment, or add --user: pip install --user spacy

SSL: CERTIFICATE_VERIFY_FAILED

Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.

Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org spacy

MemoryError when loading data

Cause: Dataset is too large to fit in RAM.

Fix: Read in chunks, filter columns on load, or consider Polars/Dask for out-of-core processing.

Recent Releases

VersionReleased
3.8.14 latest 2026-03-29
3.8.12 2026-03-23
3.8.13 2026-03-23
3.8.10 2025-11-17
3.8.11 2025-11-17

Full release history on PyPI →

Manage spacy

Upgrade to latest version

pip install --upgrade spacy

Install a specific version

pip install spacy==3.8.14

Uninstall

pip uninstall spacy

Check what is installed

pip show spacy

Last updated: 2026-04-11 • Data from PyPI