spaCy / Model errors

Causes and fixes for spaCy model errors

Common errors when downloading and loading spaCy models such as en_core_web_sm and zh_core_web_sm, listed by exact message, each with its cause and fix.

Short answer

spaCy models are separate Python packages that pip install spacy does not include, so they must be installed with spacy download into the same Python environment that runs your code, and the wrong environment or a shortcut name removed in v3 makes loading fail.

Setting up your environment this way avoids most errors on this page.

PracticeWhat happens if you skip it
Install models with python -m spacy download en_core_web_sm, using the python of the environment that runs your code.The model lands in another environment and loading fails with E050.
Load with the full package name, for example spacy.load("en_core_web_sm").The v2 shortcut en fails in v3 with E941.
For deployed projects, put the model's GitHub Releases link in requirements.txt.It works locally but the model is missing after deployment.
After upgrading spaCy, run python -m spacy validate and update models as it suggests.Models that do not match the spaCy version warn or fail on load.
In IDEs (Spyder, PyCharm, VS Code), select the same interpreter you installed the model with.The model loads on the command line but not in the IDE.

Troubleshooting by error message

Find your exact error message. Each entry gives the cause, the fix, and what may come up after the fix.

OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory.

Cause: The model is not installed in the Python environment running your code, often because the IDE uses another interpreter.

Fix: Run python -m spacy download en_core_web_sm in the environment that runs your code; in Spyder, select that environment's interpreter in preferences, install spyder-kernels and restart the kernel.

What may come next: When conda and venv are mixed, both the command-line python and the IDE python may differ from what you expect, so check sys.executable.

OSError: [E941] Can't find model 'en'. It looks like you're trying to load a model from a shortcut, which is obsolete as of spaCy v3.0.

Cause: spaCy v3 dropped shortcut names such as en and zh, so spacy.load("en") from old tutorials no longer works.

Fix: Use the full model package name, for example spacy.load("en_core_web_sm"), and zh_core_web_sm for Chinese.

OSError: [E050] Can't find model (after deploying to Streamlit, Hugging Face Spaces or similar)

Cause: The model was only installed locally, and the platform installs dependencies from requirements.txt, which does not list it.

Fix: Add the model link to requirements.txt, for example en_core_web_sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl, matching your spaCy version.

What may come next: If the model and spaCy versions do not match, the deployment then fails with E053, unable to read config.cfg.

UserWarning: [W094] Model 'en_core_web_md' (2.2.5) specifies an under-constrained spaCy version requirement

Cause: The environment has an old model trained for spaCy v2 that does not match the current spaCy v3.

Fix: Run python -m spacy validate to see mismatched models, then download the matching versions with python -m spacy download.

What may come next: Keeping the old model can lead to E053 at load time or results that differ from what you expect.

python -m spacy download fails with CERTIFICATE_VERIFY_FAILED or a connection error

Cause: Models download from GitHub Releases, and Python cannot verify the certificate or the network cannot reach GitHub.

Fix: Run pip install -U certifi first; on corporate networks switch networks or ask the administrator; or download the model whl on a machine that can reach GitHub and install it with pip install filename.

Can't find model 'en_core_web_sm' (after building an exe with PyInstaller)

Cause: The frozen program does not look up the model package by name in site-packages.

Fix: Bundle the model folder with the program and load it by full path, for example spacy.load(r"path\en_core_web_sm\en_core_web_sm-3.8.0").

Scientify is a cloud computer with research software installed and AI agents such as Codex and Claude Code built in. Describe what you need in one sentence, for example "segment, tag and run named entity recognition on these Chinese news articles and count the most frequent organizations", and the agent uses the preinstalled spaCy to do the text processing and analysis, with no software to install and no code to write.

Compared with installing more on your own computer, the cloud computer already has spaCy 3.8.16 with the English en_core_web_sm and Chinese zh_core_web_sm models and spacy-pkuseg for Chinese segmentation, and other models download directly from GitHub, and runs continue after you close your laptop.

The cloud computer comes with more computing power: CPU and GPU clusters can be called on demand for large-scale scientific computing. Compute is billed by the minutes you actually use, so nothing is wasted.

Cloud computer
4 vCPU · 8 GB
Top configuration, for data processing and small to medium jobs
Callable GPU
96 GB VRAM
Up to an RTX PRO 6000 per GPU; H800 80 GB and up to 8 × A10G also available
Callable CPU
224 cores · 3 TB
Largest spec, for large parallel computations

References

Frequently asked questions

Which model should I use for Chinese?

Use zh_core_web_sm, zh_core_web_md and the other Chinese pipelines. In spaCy v3 Chinese is segmented by character by default, and jieba or pkuseg can be enabled in the config.

What is the difference between sm, md, lg and trf?

sm is smallest and fastest, md and lg include word vectors, and trf is transformer-based with the best accuracy but needs more memory and ideally a GPU.

How do I check that models match my spaCy version?

Run python -m spacy validate; it lists installed models and whether they are compatible with the current spaCy.

Do natural language processing with Scientify without setup

Upload your data, describe the computation, and Scientify runs it on a cloud computer that is already set up. New accounts get a free cloud computer and US$5 in credit.