- スキャンID:
- ebf09856-e306-46ec-9ef6-23f3cae39fc4終了
- 送信済みURL:
- https://spacy.io/usage
- レポート終了日:
リンク · 75件検出
ページから特定された発信リンク
リンク | テキスト |
---|---|
https://github.com/explosion/spacy-layout | 💥New: spaCy for PDFs and Word docs |
https://github.com/explosion/projects | Project Templates |
https://explosion.ai/custom-solutions | Custom Solutions |
https://pypi.python.org/pypi/spacy | pip |
https://anaconda.org/conda-forge/spacy | conda |
https://github.com/explosion/spaCy/tree/master/setup.cfg | setup.cfg |
https://github.com/explosion/spacy-lookups-data | spacy-lookups-data |
https://github.com/explosion/spacy-transformers | spacy-transformers |
https://cupy.chainer.org | cupy |
https://github.com/explosion/thinc-apple-ops | thinc-apple-ops |
JavaScript変数 · 17件検出
ページのウィンドウオブジェクトにロードされたグローバルのJavaScript変数は関数以外の場所で宣言された変数で、現在のスコープ内であればコードのどこからでもアクセス可能です
名前 | 規模 |
---|---|
onbeforetoggle | object |
documentPictureInPicture | object |
onscrollend | object |
webpackChunk_N_E | object |
workbox | object |
__next_require__ | function |
next | object |
__NEXT_DATA__ | object |
__SSG_MANIFEST_CB | function |
__NEXT_P | object |
コンソールログメッセージ · 0件検出
Webコンソールにログ記録されたメッセージ
HTML
未加工のHTMLページ本文
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><link rel="sitemap" type="application/xml" href="/sitemap.xml"><link rel="shortcut icon" href="/icons/icon-192x192.png"><link rel="manifest" href="/manifest.webmanifest"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=5.0, shrink-to-fit=no, viewport-fit=cover"><meta name="theme-color" content="#09a3d5"><link rel="apple-touch-icon" sizes="192x192" href="/icons/icon-192x192.png"><link rel="apple-touch-icon" sizes="256x256" href="/icons/icon-256x256.png"><link rel="apple-touch-icon" sizes="384x384" href="/icons/icon-384x384.png"><link rel="apple-touch-icon" sizes="512x512" href="/icons/icon-512x512.png"><title>Install spaCy · spaCy Usage Documentation</title><meta name="description" content="spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more."><meta property="og:title" content="Install spaCy · spaCy Usage Documentation"><meta property="og:description" content="spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more."><meta property="og:type" content="website"><meta property="og:site_name" content="Install spaCy"><meta property="og:image" content="https://spacy.io/_next/static/media/social_default.96b04585.jpg"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:image" content="https://spacy.io/_next/static/media/social_default.96b04585.jpg"><meta name="twitter:creator" content="@spacy_io"><meta name="twitter:site" content="@spacy_io"><meta name="twitter:title" content="Install spaCy · spaCy Usage Documentation"><meta name="twitter:description" content="spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more."><meta name="docsearch:language" content="en"><meta name="next-head-count" content="24"><link rel="preload" href="/_next/static/css/bce6167518123034.css" as="style"><link rel="stylesheet" href="/_next/static/css/bce6167518123034.css" data-n-g=""><link rel="preload" href="/_next/static/css/9d58b6a69bc324cf.css" as="style"><link rel="stylesheet" href="/_next/static/css/9d58b6a69bc324cf.css" data-n-p=""><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-c67a75d1b6f99dc8.js"></script><script defer="" src="/_next/static/chunks/728.696ff79385955b23.js"></script><script src="/_next/static/chunks/webpack-a62ca0d8b8b9e964.js" defer=""></script><script src="/_next/static/chunks/framework-3b5a00d5d7e8d93b.js" defer=""></script><script src="/_next/static/chunks/main-a0f603ce323043fd.js" defer=""></script><script src="/_next/static/chunks/pages/_app-e15cdaeb9829b3d1.js" defer=""></script><script src="/_next/static/chunks/94-57434c8b7a6c3878.js" defer=""></script><script src="/_next/static/chunks/128-a416be7fda64862e.js" defer=""></script><script src="/_next/static/chunks/pages/%5B...listPathPage%5D-45eea57fe8c2902c.js" defer=""></script><script src="/_next/static/mcRyF2evOJ0_ezPiVrnUF/_buildManifest.js" defer=""></script><script src="/_next/static/mcRyF2evOJ0_ezPiVrnUF/_ssgManifest.js" defer=""></script><link as="script" rel="prefetch" href="/_next/static/chunks/pages/index-64945f983a5fb9c7.js"><link as="script" rel="prefetch" href="/_next/static/chunks/pages/universe-def195243a6963bb.js"></head><body class="theme-blue"><div id="__next"><div class="theme-blue"><nav class="navigation_root__yPL8O"><span class="navigation_has-alert__s0Drf"><a class="link_root__1Me7D link_no-link-layout__RPvod" aria-label="spaCy" href="/"><h1 class="navigation_title__pm49s">spaCy</h1><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 308.5 595.3 213" width="300" height="96" class="navigation_logo__kRc3J" style="color: rgb(9, 163, 213);"><path fill="currentColor" d="M73.7 395.2c-13.5-1.6-14.5-19.7-31.8-18.1-8.4 0-16.2 3.5-16.2 11.2 0 11.6 17.9 12.7 28.7 15.6 18.4 5.6 36.2 9.4 36.2 29.4 0 25.4-19.9 34.2-46.2 34.2-22 0-44.3-7.8-44.3-28 0-5.6 5.4-10 10.6-10 6.6 0 8.9 2.8 11.2 7.4 5.1 9 10.8 13.8 25 13.8 9 0 18.2-3.4 18.2-11.2 0-11.1-11.3-13.5-23-16.2-20.7-5.8-38.5-8.8-40.6-31.8-2.2-39.2 79.5-40.7 84.2-6.3-.1 6.2-5.9 10-12 10zm97.2-34.4c28.7 0 45 24 45 53.6 0 29.7-15.8 53.6-45 53.6-16.2 0-26.3-6.9-33.6-17.5v39.2c0 11.8-3.8 17.5-12.4 17.5-10.5 0-12.4-6.7-12.4-17.5v-114c0-9.3 3.9-15 12.4-15 8 0 12.4 6.3 12.4 15v3.2c8.1-10.2 17.4-18.1 33.6-18.1zm-6.8 86.8c16.8 0 24.3-15.5 24.3-33.6 0-17.7-7.6-33.6-24.3-33.6-17.5 0-25.6 14.4-25.6 33.6 0 18.7 8.2 33.6 25.6 33.6zm71.3-58.8c0-20.6 23.7-28 46.7-28 32.3 0 45.6 9.4 45.6 40.6v30c0 7.1 4.4 21.3 4.4 25.6 0 6.5-6 10.6-12.4 10.6-7.1 0-12.4-8.4-16.2-14.4-10.5 8.4-21.6 14.4-38.6 14.4-18.8 0-33.6-11.1-33.6-29.4 0-16.2 11.6-25.5 25.6-28.7 0 .1 45-10.6 45-10.7 0-13.8-4.9-19.9-19.4-19.9-12.8 0-19.3 3.5-24.3 11.2-4 5.8-3.5 9.3-11.2 9.3-6.2-.1-11.6-4.3-11.6-10.6zm38.4 61.9c19.7 0 28-10.4 28-31.1v-4.4c-5.3 1.8-26.7 7.1-32.5 8-6.2 1.2-12.4 5.8-12.4 13.1.2 8 8.4 14.4 16.9 14.4zm144.7-129c27.8 0 57.9 16.6 57.9 43 0 6.8-5.1 12.4-11.8 12.4-9.1 0-10.4-4.9-14.4-11.8-6.7-12.3-14.6-20.5-31.8-20.5-26.6-.2-38.5 22.6-38.5 51 0 28.6 9.9 49.2 37.4 49.2 18.3 0 28.4-10.6 33.6-24.3 2.1-6.3 5.9-12.4 13.8-12.4 6.2 0 12.4 6.3 12.4 13.1 0 28-28.6 47.4-58 47.4-32.2 0-50.4-13.6-60.4-36.2-4.9-10.8-8-22-8-37.4-.2-43.4 25.1-73.5 67.8-73.5zm159 39.1c7.1 0 11.2 4.6 11.2 11.8 0 2.9-2.3 8.7-3.2 11.8l-34.2 89.9c-7.6 19.5-13.3 33-39.2 33-12.3 0-23-1.1-23-11.8 0-6.2 4.7-9.3 11.2-9.3 1.2 0 3.2.6 4.4.6 1.9 0 3.2.6 4.4.6 13 0 14.8-13.3 19.4-22.5l-33-81.7c-1.9-4.4-3.2-7.4-3.2-10 0-7.2 5.6-12.4 13.1-12.4 8.4 0 11.7 6.6 13.8 13.8l21.8 64.8 21.8-59.9c3.3-9.3 3.6-18.7 14.7-18.7z"></path></svg></a> <span class="navigation_alert__ZOXon"><a class="link_root__1Me7D link_no-link-layout__RPvod" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spacy-layout">💥 <strong>New:</strong> spaCy for PDFs and Word docs</a></span></span><div class="navigation_menu__ZMJxN"><select class="dropdown_root__3uiQq navigation_dropdown__4j4pI"><option value="title" disabled="">Menu</option><option value="/usage" selected="">Usage</option><option value="/models">Models</option><option value="/api">API</option><option value="/universe">Universe</option></select><ul class="navigation_list__DCzqi"><li class="navigation_item__ln1O1 navigation_is-active__RjVJG"><a class="link_root__1Me7D link_no-link-layout__RPvod" tabindex="-1" href="/usage">Usage</a></li><li class="navigation_item__ln1O1"><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/models">Models</a></li><li class="navigation_item__ln1O1"><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/api">API</a></li><li class="navigation_item__ln1O1"><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/universe">Universe</a></li><li class="navigation_item__ln1O1 navigation_github__MpFNv"><span><span></span></span></li></ul><div class="navigation_search__BKZCn"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"><svg width="15" height="15" class="DocSearch-Control-Key-Icon"><path d="M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953" stroke-width="1.2" stroke="currentColor" fill="none" stroke-linecap="square"></path></svg></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div></div><progress class="progress_root__9huWN" value="0" max="100"></progress></nav><menu class="sidebar sidebar_root__s2No7"><h1 hidden="" aria-hidden="true" class="h0 sidebar_active-heading___dkf9">Get started</h1><div class="sidebar_dropdown__vyqjz"><select class="dropdown_root__3uiQq sidebar_dropdown-select__Nwbq9"><option disabled="">Select page...</option><option value="/usage" selected="">Get started<!-- --> › <!-- -->Installation</option><option value="/usage/models">Get started<!-- --> › <!-- -->Models & Languages</option><option value="/usage/facts-figures">Get started<!-- --> › <!-- -->Facts & Figures</option><option value="/usage/spacy-101">Get started<!-- --> › <!-- -->spaCy 101</option><option value="/usage/v3-7">Get started<!-- --> › <!-- -->New in v3.7</option><option value="/usage/v3-6">Get started<!-- --> › <!-- -->New in v3.6</option><option value="/usage/v3-5">Get started<!-- --> › <!-- -->New in v3.5</option><option value="/usage/linguistic-features">Guides<!-- --> › <!-- -->Linguistic Features</option><option value="/usage/rule-based-matching">Guides<!-- --> › <!-- -->Rule-based Matching</option><option value="/usage/processing-pipelines">Guides<!-- --> › <!-- -->Processing Pipelines</option><option value="/usage/embeddings-transformers">Guides<!-- --> › <!-- -->Embeddings & Transformers</option><option value="/usage/large-language-models">Guides<!-- --> › <!-- -->Large Language Models</option><option value="/usage/training">Guides<!-- --> › <!-- -->Training Models</option><option value="/usage/layers-architectures">Guides<!-- --> › <!-- -->Layers & Model Architectures</option><option value="/usage/projects">Guides<!-- --> › <!-- -->spaCy Projects</option><option value="/usage/saving-loading">Guides<!-- --> › <!-- -->Saving & Loading</option><option value="/usage/memory-management">Guides<!-- --> › <!-- -->Memory Management</option><option value="/usage/visualizers">Guides<!-- --> › <!-- -->Visualizers</option><option value="https://github.com/explosion/projects">Resources<!-- --> › <!-- -->Project Templates</option><option value="https://v2.spacy.io">Resources<!-- --> › <!-- -->v2.x Documentation</option><option value="https://explosion.ai/custom-solutions">Resources<!-- --> › <!-- -->Custom Solutions</option></select></div><ul class="sidebar_section__DArOO"><li class="sidebar_label__V3K28">Get started</li><li><a class="link_root__1Me7D sidebar_link__sKXFP sidebar_is-active__yVTtL is-active" href="/usage">Installation</a><ul class="sidebar_crumbs__NhM2y"><li class="sidebar_crumb__tiiDl sidebar_crumb-active__zq8BI"><a href="#quickstart">Quickstart</a></li><li class="sidebar_crumb__tiiDl"><a href="#installation">Instructions</a></li><li class="sidebar_crumb__tiiDl"><a href="#troubleshooting">Troubleshooting</a></li><li class="sidebar_crumb__tiiDl"><a href="#changelog">Changelog</a></li></ul></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/models">Models & Languages</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/facts-figures">Facts & Figures</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/spacy-101">spaCy 101</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/v3-7">New in v3.7</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/v3-6">New in v3.6</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/v3-5">New in v3.5</a></li></ul><ul class="sidebar_section__DArOO"><li class="sidebar_label__V3K28">Guides</li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/linguistic-features">Linguistic Features</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/rule-based-matching">Rule-based Matching</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/processing-pipelines">Processing Pipelines</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/embeddings-transformers">Embeddings & Transformers</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/large-language-models">Large Language Models</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/training">Training Models</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/layers-architectures">Layers & Model Architectures</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/projects">spaCy Projects</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/saving-loading">Saving & Loading</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/memory-management">Memory Management</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="/usage/visualizers">Visualizers</a></li></ul><ul class="sidebar_section__DArOO"><li class="sidebar_label__V3K28">Resources</li><li><a class="link_root__1Me7D sidebar_link__sKXFP" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/projects">Project Templates</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="https://v2.spacy.io">v2.x Documentation</a></li><li><a class="link_root__1Me7D sidebar_link__sKXFP" href="https://explosion.ai/custom-solutions">Custom Solutions</a></li></ul></menu><main class="main_root__7f6Tj main_with-sidebar__uH1df main_with-asides__ikQT6"><article class="main_content__8zFCH"><header class="title_root__pS2WQ"><h1 id="_title" class="typography_heading__D82WZ typography_h1__b7dt9 title_h1__l3CW1"><span class="heading-text">Install spaCy<!-- --> </span></h1></header><section class="section_root__k1hUl"><aside class="aside_root__667WA"><div class="aside_content__ZN6qm" role="complementary"><div class="aside_text__LFH_Q">
<h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">📖 Looking for the old docs?<!-- --> </span></h4>
<p>To help you make the transition from v2.x to v3.0, we’ve uploaded the old
website to <a class="link_root__1Me7D" href="https://v2.spacy.io/docs"><strong>v2.spacy.io</strong></a>. To see what’s changed
and how to migrate, see the <a class="link_root__1Me7D" href="/usage/v3">v3.0 guide</a>.</p>
</div></div></aside><section id="quickstart" class="section_root__k1hUl"><div class="quickstart_root__Mjkpo"><div data-quickstart-group="os" class="quickstart_group__T6F5g"><div class="quickstart_legend__j4TW7">Operating system</div><div class="quickstart_fields__22fYl"><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="os" id="quickstart-mac" value="mac"><label class="quickstart_label__qpE0q" for="quickstart-mac">macOS / OSX</label><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="os" id="quickstart-windows" value="windows"><label class="quickstart_label__qpE0q" for="quickstart-windows">Windows</label><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="os" id="quickstart-linux" value="linux"><label class="quickstart_label__qpE0q" for="quickstart-linux">Linux</label><span class="quickstart_field-extra__qhKGH"></span></div></div><div data-quickstart-group="platform" class="quickstart_group__T6F5g"><div class="quickstart_legend__j4TW7">Platform</div><div class="quickstart_fields__22fYl"><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="platform" id="quickstart-x86" value="x86"><label class="quickstart_label__qpE0q" for="quickstart-x86">x86</label><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="platform" id="quickstart-arm" value="arm"><label class="quickstart_label__qpE0q" for="quickstart-arm">ARM / M1</label><span class="quickstart_field-extra__qhKGH"></span></div></div><div data-quickstart-group="package" class="quickstart_group__T6F5g"><div class="quickstart_legend__j4TW7">Package manager</div><div class="quickstart_fields__22fYl"><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="package" id="quickstart-pip" value="pip"><label class="quickstart_label__qpE0q" for="quickstart-pip">pip</label><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="package" id="quickstart-conda" value="conda"><label class="quickstart_label__qpE0q" for="quickstart-conda">conda</label><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="package" id="quickstart-source" value="source"><label class="quickstart_label__qpE0q" for="quickstart-source">from source</label><span class="quickstart_field-extra__qhKGH"></span></div></div><div data-quickstart-group="hardware" class="quickstart_group__T6F5g"><div class="quickstart_legend__j4TW7">Hardware</div><div class="quickstart_fields__22fYl"><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="hardware" id="quickstart-cpu" value="cpu"><label class="quickstart_label__qpE0q" for="quickstart-cpu">CPU</label><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="hardware" id="quickstart-gpu" value="gpu"><label class="quickstart_label__qpE0q" for="quickstart-gpu">GPU</label><span class="quickstart_field-extra__qhKGH"><select class="quickstart_select__2S4nU quickstart_select-hidden__cY2ml"><option value="cuda80">CUDA 8.0</option><option value="cuda90">CUDA 9.0</option><option value="cuda91">CUDA 9.1</option><option value="cuda92">CUDA 9.2</option><option value="cuda100">CUDA 10.0</option><option value="cuda101">CUDA 10.1</option><option value="cuda102">CUDA 10.2</option><option value="cuda110">CUDA 11.0</option><option value="cuda111">CUDA 11.1</option><option value="cuda11x" selected="">CUDA 11.2-11.x</option><option value="cuda12x">CUDA 12.x</option></select></span></div></div><div data-quickstart-group="config" class="quickstart_group__T6F5g"><div class="quickstart_legend__j4TW7">Configuration</div><div class="quickstart_fields__22fYl"><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="config" id="quickstart-venv" value="venv"><label class="quickstart_label__qpE0q" for="quickstart-venv">virtual env<span data-tooltip="Use a virtual environment" class="quickstart_help__QALrh"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 28" class="icon_root__EGBLT" aria-hidden="true"><path d="M14 21.5v-3c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v3c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM18 11c0-2.859-3-5-5.688-5-2.547 0-4.453 1.094-5.797 3.328-0.141 0.219-0.078 0.5 0.125 0.656l2.063 1.563c0.078 0.063 0.187 0.094 0.297 0.094 0.141 0 0.297-0.063 0.391-0.187 0.734-0.938 1.047-1.219 1.344-1.437 0.266-0.187 0.781-0.375 1.344-0.375 1 0 1.922 0.641 1.922 1.328 0 0.812-0.422 1.219-1.375 1.656-1.109 0.5-2.625 1.797-2.625 3.313v0.562c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5v0c0-0.359 0.453-1.125 1.188-1.547 1.188-0.672 2.812-1.578 2.812-3.953zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"></path></svg></span></label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="config" id="quickstart-train" value="train"><label class="quickstart_label__qpE0q" for="quickstart-train">train models<span data-tooltip="Check this if you plan to train your own models with spaCy to install extra dependencies and data resources" class="quickstart_help__QALrh"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 28" class="icon_root__EGBLT" aria-hidden="true"><path d="M14 21.5v-3c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v3c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM18 11c0-2.859-3-5-5.688-5-2.547 0-4.453 1.094-5.797 3.328-0.141 0.219-0.078 0.5 0.125 0.656l2.063 1.563c0.078 0.063 0.187 0.094 0.297 0.094 0.141 0 0.297-0.063 0.391-0.187 0.734-0.938 1.047-1.219 1.344-1.437 0.266-0.187 0.781-0.375 1.344-0.375 1 0 1.922 0.641 1.922 1.328 0 0.812-0.422 1.219-1.375 1.656-1.109 0.5-2.625 1.797-2.625 3.313v0.562c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5v0c0-0.359 0.453-1.125 1.188-1.547 1.188-0.672 2.812-1.578 2.812-3.953zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"></path></svg></span></label><span class="quickstart_field-extra__qhKGH"></span></div></div><div data-quickstart-group="models" class="quickstart_group__T6F5g"><div class="quickstart_legend__j4TW7">Trained pipelines</div><div class="quickstart_fields__22fYl"><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-ca" value="ca"><label class="quickstart_label__qpE0q" for="quickstart-ca">Catalan</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-zh" value="zh"><label class="quickstart_label__qpE0q" for="quickstart-zh">Chinese</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-hr" value="hr"><label class="quickstart_label__qpE0q" for="quickstart-hr">Croatian</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-da" value="da"><label class="quickstart_label__qpE0q" for="quickstart-da">Danish</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-nl" value="nl"><label class="quickstart_label__qpE0q" for="quickstart-nl">Dutch</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-en" value="en"><label class="quickstart_label__qpE0q" for="quickstart-en">English</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-fi" value="fi"><label class="quickstart_label__qpE0q" for="quickstart-fi">Finnish</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-fr" value="fr"><label class="quickstart_label__qpE0q" for="quickstart-fr">French</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-de" value="de"><label class="quickstart_label__qpE0q" for="quickstart-de">German</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-el" value="el"><label class="quickstart_label__qpE0q" for="quickstart-el">Greek</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-it" value="it"><label class="quickstart_label__qpE0q" for="quickstart-it">Italian</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-ja" value="ja"><label class="quickstart_label__qpE0q" for="quickstart-ja">Japanese</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-ko" value="ko"><label class="quickstart_label__qpE0q" for="quickstart-ko">Korean</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-lt" value="lt"><label class="quickstart_label__qpE0q" for="quickstart-lt">Lithuanian</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-mk" value="mk"><label class="quickstart_label__qpE0q" for="quickstart-mk">Macedonian</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-xx" value="xx"><label class="quickstart_label__qpE0q" for="quickstart-xx">Multi-language</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-nb" value="nb"><label class="quickstart_label__qpE0q" for="quickstart-nb">Norwegian Bokmål</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-pl" value="pl"><label class="quickstart_label__qpE0q" for="quickstart-pl">Polish</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-pt" value="pt"><label class="quickstart_label__qpE0q" for="quickstart-pt">Portuguese</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-ro" value="ro"><label class="quickstart_label__qpE0q" for="quickstart-ro">Romanian</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-ru" value="ru"><label class="quickstart_label__qpE0q" for="quickstart-ru">Russian</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-sl" value="sl"><label class="quickstart_label__qpE0q" for="quickstart-sl">Slovenian</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-es" value="es"><label class="quickstart_label__qpE0q" for="quickstart-es">Spanish</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-sv" value="sv"><label class="quickstart_label__qpE0q" for="quickstart-sv">Swedish</label><input type="checkbox" class="quickstart_input__G6ACO quickstart_checkbox__3qkPg" name="models" id="quickstart-uk" value="uk"><label class="quickstart_label__qpE0q" for="quickstart-uk">Ukrainian</label><span class="quickstart_field-extra__qhKGH"></span></div></div><div data-quickstart-group="optimize" class="quickstart_group__T6F5g"><div class="quickstart_legend__j4TW7">Select pipeline for</div><div class="quickstart_fields__22fYl"><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="optimize" id="quickstart-efficiency" value="efficiency"><label class="quickstart_label__qpE0q" for="quickstart-efficiency">efficiency<span data-tooltip="Faster and smaller pipeline, but less accurate" class="quickstart_help__QALrh"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 28" class="icon_root__EGBLT" aria-hidden="true"><path d="M14 21.5v-3c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v3c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM18 11c0-2.859-3-5-5.688-5-2.547 0-4.453 1.094-5.797 3.328-0.141 0.219-0.078 0.5 0.125 0.656l2.063 1.563c0.078 0.063 0.187 0.094 0.297 0.094 0.141 0 0.297-0.063 0.391-0.187 0.734-0.938 1.047-1.219 1.344-1.437 0.266-0.187 0.781-0.375 1.344-0.375 1 0 1.922 0.641 1.922 1.328 0 0.812-0.422 1.219-1.375 1.656-1.109 0.5-2.625 1.797-2.625 3.313v0.562c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5v0c0-0.359 0.453-1.125 1.188-1.547 1.188-0.672 2.812-1.578 2.812-3.953zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"></path></svg></span></label><input type="radio" class="quickstart_input__G6ACO quickstart_radio__3oFBd" name="optimize" id="quickstart-accuracy" value="accuracy"><label class="quickstart_label__qpE0q" for="quickstart-accuracy">accuracy<span data-tooltip="Larger and slower pipeline, but more accurate" class="quickstart_help__QALrh"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 28" class="icon_root__EGBLT" aria-hidden="true"><path d="M14 21.5v-3c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v3c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM18 11c0-2.859-3-5-5.688-5-2.547 0-4.453 1.094-5.797 3.328-0.141 0.219-0.078 0.5 0.125 0.656l2.063 1.563c0.078 0.063 0.187 0.094 0.297 0.094 0.141 0 0.297-0.063 0.391-0.187 0.734-0.938 1.047-1.219 1.344-1.437 0.266-0.187 0.781-0.375 1.344-0.375 1 0 1.922 0.641 1.922 1.328 0 0.812-0.422 1.219-1.375 1.656-1.109 0.5-2.625 1.797-2.625 3.313v0.562c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5v0c0-0.359 0.453-1.125 1.188-1.547 1.188-0.672 2.812-1.578 2.812-3.953zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z"></path></svg></span></label><span class="quickstart_field-extra__qhKGH"></span></div></div><pre class="quickstart_code__eEMiH"><code><div class="quickstart_results__3fSIL" data-quickstart-results=""><span class="quickstart_prompt__NNOUP quickstart_bash__rc2JE">pip install -U pip setuptools wheel</span><span class="quickstart_prompt__NNOUP quickstart_bash__rc2JE">pip install -U spacy</span><span class="quickstart_prompt__NNOUP quickstart_bash__rc2JE">python -m spacy download <!-- -->en_core_web_sm</span></div></code><menu class="quickstart_menu__wqAUc"><button title="Copy to clipboard" class="quickstart_icon-button__7AB6Y"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon_root__EGBLT" aria-hidden="true"><rect x="9" y="9" width="13" height="13" rx="2" ry="2" fill="none"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" fill="none"></path></svg></button></menu></pre><textarea class="quickstart_copy-area__t6z3j" rows="1" aria-label="Interactive code example for undefined"></textarea></div></section></section>
<section id="section-installation" class="section_root__k1hUl"><h2 id="installation" class="typography_heading__D82WZ typography_h2__hzV3h"><a href="#installation" class="heading-text typography_permalink__UiIRy">Installation instructions <!-- --> </a></h2><p>spaCy is compatible with <strong>64-bit CPython 3.7+</strong> and runs on <strong>Unix/Linux</strong>,
<strong>macOS/OS X</strong> and <strong>Windows</strong>. The latest spaCy releases are available over
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://pypi.python.org/pypi/spacy">pip</a> and
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://anaconda.org/conda-forge/spacy">conda</a>.</p><h3 id="pip" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#pip" class="heading-text typography_permalink__UiIRy">pip <!-- --> </a></h3><p>Using pip, spaCy releases are available as source packages and binary wheels.
Before you install spaCy and its dependencies, make sure that your <code class="code_inline-code__Bq7ot">pip</code>,
<code class="code_inline-code__Bq7ot">setuptools</code> and <code class="code_inline-code__Bq7ot">wheel</code> are up to date.</p><aside class="aside_root__667WA"><div class="aside_content__ZN6qm" role="complementary"><div class="aside_text__LFH_Q">
<h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">Download pipelines<!-- --> </span></h4>
<p>After installation you typically want to download a trained pipeline. For more
info and available packages, see the <a class="link_root__1Me7D" href="/models">models directory</a>.</p>
<pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$"><span class="code_cli-arg-subtle__IgB5m">python -m</span> <span>spacy</span> <span class="code_cli-arg__Jxl66 code_cli-arg-highlight__FLHwg"><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/api/cli#download">download</a></span> <span class="code_cli-arg__Jxl66">en_core_web_sm
</span></span><span>
</span><span><span class="token operator">>></span><span class="token operator">></span> <span class="token function">import</span> spacy
</span><span><span class="token operator">>></span><span class="token operator">></span> nlp <span class="token operator">=</span> spacy.load<span class="token punctuation">(</span><span class="token string">"en_core_web_sm"</span><span class="token punctuation">)</span></span></code></pre>
</div></div></aside><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install -U pip setuptools wheel
</span><span data-prompt="$">pip install -U spacy</span></code></pre><p>When using pip it is generally recommended to install packages in a virtual
environment to avoid modifying system state:</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">python -m venv .env
</span><span data-prompt="$">source .env/bin/activate
</span><span data-prompt="$">pip install -U pip setuptools wheel
</span><span data-prompt="$">pip install -U spacy</span></code></pre><p>spaCy also lets you install extra dependencies by specifying the following
keywords in brackets, e.g. <code class="code_inline-code__Bq7ot">spacy[ja]</code> or <code class="code_inline-code__Bq7ot">spacy[lookups,transformers]</code> (with
multiple comma-separated extras). See the <code class="code_inline-code__Bq7ot">[options.extras_require]</code> section in
spaCy’s <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/tree/master/setup.cfg"><code class="code_inline-code__Bq7ot">setup.cfg</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a> for details on what’s included.</p><aside class="aside_root__667WA"><div class="aside_content__ZN6qm" role="complementary"><div class="aside_text__LFH_Q">
<h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">Example<!-- --> </span></h4>
<pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install spacy[lookups,transformers]</span></code></pre>
</div></div></aside><table class="table_root__ZlA_w"><thead><tr class="table_tr__K_tkF"><th class="table_th__QJ9F8">Name</th><th class="table_th__QJ9F8">Description</th></tr></thead><tbody><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">lookups</code></td><td class="table_td__rmpJx">Install <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spacy-lookups-data"><code class="code_inline-code__Bq7ot">spacy-lookups-data</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a> for data tables for lemmatization and lexeme normalization. The data is serialized with trained pipelines, so you only need this package if you want to train your own models.</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">transformers</code></td><td class="table_td__rmpJx">Install <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spacy-transformers"><code class="code_inline-code__Bq7ot">spacy-transformers</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>. The package will be installed automatically when you install a transformer-based pipeline.</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">cuda</code>, …</td><td class="table_td__rmpJx">Install spaCy with GPU support provided by <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://cupy.chainer.org">CuPy</a> for your given CUDA version. See the GPU <a class="link_root__1Me7D" href="/usage#gpu">installation instructions</a> for details and options.</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">apple</code></td><td class="table_td__rmpJx">Install <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/thinc-apple-ops"><code class="code_inline-code__Bq7ot">thinc-apple-ops</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a> to improve performance on an Apple M1.</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">ja</code>, <code class="code_inline-code__Bq7ot">ko</code>, <code class="code_inline-code__Bq7ot">th</code></td><td class="table_td__rmpJx">Install additional dependencies required for tokenization for the <a class="link_root__1Me7D" href="/usage/models#languages">languages</a>.</td></tr></tbody></table><h3 id="conda" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#conda" class="heading-text typography_permalink__UiIRy">conda <!-- --> </a></h3><p>Thanks to our great community, we’ve been able to re-add conda support. You can
also install spaCy via <code class="code_inline-code__Bq7ot">conda-forge</code>:</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">conda install -c conda-forge spacy</span></code></pre><p>For the feedstock including the build recipe and configuration, check out
<a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/conda-forge/spacy-feedstock"><span class="link_source-text__VDP74">this repository</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>. Note that we
currently don’t publish any <a class="link_root__1Me7D" href="/usage#changelog-pre">pre-releases</a> on conda.</p><h3 id="upgrading" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#upgrading" class="heading-text typography_permalink__UiIRy">Upgrading spaCy <!-- --> </a></h3><aside class="aside_root__667WA"><div class="aside_content__ZN6qm" role="complementary"><div class="aside_text__LFH_Q">
<h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">Upgrading from v2 to v3<!-- --> </span></h4>
<p>Although we’ve tried to keep breaking changes to a minimum, upgrading from
spaCy v2.x to v3.x may still require some changes to your code base. For
details see the sections on <a class="link_root__1Me7D" href="/usage/v3#incompat">backwards incompatibilities</a>
and <a class="link_root__1Me7D" href="/usage/v3#migrating">migrating</a>. Also remember to download the new
trained pipelines, and retrain your own pipelines.</p>
</div></div></aside><p>When updating to a newer version of spaCy, it’s generally recommended to start
with a clean virtual environment. If you’re upgrading to a new major version,
make sure you have the latest <strong>compatible trained pipelines</strong> installed, and
that there are no old and incompatible packages left over in your environment,
as this can often lead to unexpected results and errors. If you’ve trained your
own models, keep in mind that your train and runtime inputs must match. This
means you’ll have to <strong>retrain your pipelines</strong> with the new version.</p><p>spaCy also provides a <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" href="/api/cli#validate"><code class="code_inline-code__Bq7ot">validate</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M15.5 11h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 7h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM10.5 15h-6c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h6c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 3h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5z"></path></svg></a> command, which lets you
verify that all installed pipeline packages are compatible with your spaCy
version. If incompatible packages are found, tips and installation instructions
are printed. It’s recommended to run the command with <code class="code_inline-code__Bq7ot">python -m</code> to make sure
you’re executing the correct version of spaCy.</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install -U spacy
</span><span data-prompt="$"><span class="code_cli-arg-subtle__IgB5m">python -m</span> <span>spacy</span> <span class="code_cli-arg__Jxl66 code_cli-arg-highlight__FLHwg"><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/api/cli#validate">validate</a></span></span></code></pre><h3 id="gpu" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#gpu" class="heading-text typography_permalink__UiIRy">Run spaCy with GPU <!-- --> </a></h3><p>As of v2.0, spaCy comes with neural network models that are implemented in our
machine learning library, <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://thinc.ai">Thinc</a>. For GPU support, we’ve been
grateful to use the work of Chainer’s <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://cupy.chainer.org">CuPy</a> module,
which provides a numpy-compatible interface for GPU arrays.</p><p>spaCy can be installed for a CUDA-compatible GPU by specifying <code class="code_inline-code__Bq7ot">spacy[cuda]</code>,
<code class="code_inline-code__Bq7ot">spacy[cuda102]</code>, <code class="code_inline-code__Bq7ot">spacy[cuda112]</code>, <code class="code_inline-code__Bq7ot">spacy[cuda113]</code>, etc. If you know your CUDA
version, using the more explicit specifier allows CuPy to be installed via
wheel, saving some compilation time. The specifiers should install
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://cupy.chainer.org"><code class="code_inline-code__Bq7ot">cupy</code></a>.</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install -U spacy[cuda113]</span></code></pre><p>Once you have a GPU-enabled installation, the best way to activate it is to call
<a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" href="/api/top-level#spacy.prefer_gpu"><code class="code_inline-code__Bq7ot">spacy.prefer_gpu</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M15.5 11h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 7h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM10.5 15h-6c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h6c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 3h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5z"></path></svg></a> or
<a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" href="/api/top-level#spacy.require_gpu"><code class="code_inline-code__Bq7ot">spacy.require_gpu()</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M15.5 11h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 7h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM10.5 15h-6c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h6c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 3h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5z"></path></svg></a> somewhere in your
script before any pipelines have been loaded. <code class="code_inline-code__Bq7ot">require_gpu</code> will raise an error
if no GPU is available.</p><pre class="code_pre__kzg60 language-python" tabindex="0"><code class="code_code__CILJL language-python"><span><span class="token keyword">import</span> spacy
</span><span>
</span><span>spacy<span class="token punctuation">.</span>prefer_gpu<span class="token punctuation">(</span><span class="token punctuation">)</span>
</span><span>nlp <span class="token operator">=</span> spacy<span class="token punctuation">.</span>load<span class="token punctuation">(</span><span class="token string">"en_core_web_sm"</span><span class="token punctuation">)</span></span></code></pre><h3 id="source" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#source" class="heading-text typography_permalink__UiIRy">Compile from source <!-- --> </a></h3><p>The other way to install spaCy is to clone its
<a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy"><span class="link_source-text__VDP74">GitHub repository</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a> and build it from
source. That is the common way if you want to make changes to the code base.
You’ll need to make sure that you have a development environment consisting of a
Python distribution including header files, a compiler,
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://pip.pypa.io/en/stable/">pip</a> and <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://git-scm.com">git</a> installed.
The compiler part is the trickiest. How to do that depends on your system. See
notes on <a class="link_root__1Me7D" href="/usage#source-ubuntu">Ubuntu</a>, <a class="link_root__1Me7D" href="/usage#source-osx">macOS / OS X</a> and
<a class="link_root__1Me7D" href="/usage#source-windows">Windows</a> for details.</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">python -m pip install -U pip setuptools wheel <span class="token comment"># install/update build tools
</span></span><span data-prompt="$">git clone https://github.com/explosion/spaCy <span class="token comment"># clone spaCy
</span></span><span data-prompt="$">cd spaCy <span class="token comment"># navigate into dir
</span></span><span data-prompt="$">python -m venv .env <span class="token comment"># create environment in .env
</span></span><span data-prompt="$">source .env/bin/activate <span class="token comment"># activate virtual env
</span></span><span data-prompt="$">pip install -r requirements.txt <span class="token comment"># install requirements
</span></span><span data-prompt="$">pip install --no-build-isolation --editable . <span class="token comment"># compile and install spaCy</span></span></code></pre><p>To install with extras:</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install --no-build-isolation --editable .[lookups,cuda102]</span></code></pre><p>How to install compilers and related build tools:</p><ul class="list_ul__fe_HF">
<li class="list_li__sfx_z"><strong id="source-ubuntu">Ubuntu:</strong> Install system-level dependencies via
<code class="code_inline-code__Bq7ot">apt-get</code>: <code class="code_inline-code__Bq7ot code_wrap__b41os">sudo apt-get install build-essential python-dev git</code></li>
<li class="list_li__sfx_z"><strong id="source-osx">macOS / OS X:</strong> Install a recent version of <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://developer.apple.com/xcode/">XCode</a>,
including the so-called “Command Line Tools”. macOS and OS X ship with Python and
Git preinstalled.</li>
<li class="list_li__sfx_z"><strong id="source-windows">Windows:</strong> Install a version of the <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://visualstudio.microsoft.com/visual-cpp-build-tools/">Visual
C++ Build Tools</a> or
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://www.visualstudio.com/vs/visual-studio-express/">Visual Studio Express</a>
that matches the version that was used to compile your Python interpreter.</li>
</ul><h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">Using build constraints when compiling from source<!-- --> </span></h4><p>If you install spaCy from source or with <code class="code_inline-code__Bq7ot">pip</code> for platforms where there are not
binary wheels on PyPI, you may need to use build constraints if any package in
your environment requires an older version of <code class="code_inline-code__Bq7ot">numpy</code>.</p><p>If <code class="code_inline-code__Bq7ot">numpy</code> gets downgraded from the most recent release at any point after
you’ve compiled <code class="code_inline-code__Bq7ot">spacy</code>, you might see an error that looks like this:</p><pre class="code_pre__kzg60 language-none" tabindex="0"><code class="code_code__CILJL language-none">numpy.ndarray size changed, may indicate binary incompatibility.</code></pre><p>To fix this, create a new virtual environment and install <code class="code_inline-code__Bq7ot">spacy</code> and all of its
dependencies using build constraints.
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://pip.pypa.io/en/stable/user_guide/#constraints-files">Build constraints</a>
specify an older version of <code class="code_inline-code__Bq7ot">numpy</code> that is only used while compiling <code class="code_inline-code__Bq7ot">spacy</code>,
and then your runtime environment can use any newer version of <code class="code_inline-code__Bq7ot">numpy</code> and still
be compatible. In addition, use <code class="code_inline-code__Bq7ot">--no-cache-dir</code> to ignore any previously cached
wheels so that all relevant packages are recompiled from scratch:</p><pre class="code_pre__kzg60 language-shell" tabindex="0"><code class="code_code__CILJL language-shell"><span><span class="token assign-left variable">PIP_CONSTRAINT</span><span class="token operator">=</span>https://raw.githubusercontent.com/explosion/spacy/master/build-constraints.txt <span class="token punctuation">\</span>
</span><span>pip <span class="token function">install</span> spacy --no-cache-dir</span></code></pre><p>Our build constraints currently specify the oldest supported <code class="code_inline-code__Bq7ot">numpy</code> available
on PyPI for <code class="code_inline-code__Bq7ot">x86_64</code> and <code class="code_inline-code__Bq7ot">aarch64</code>. Depending on your platform and environment,
you may want to customize the specific versions of <code class="code_inline-code__Bq7ot">numpy</code>. For other platforms,
you can have a look at SciPy’s
<a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg"><code class="code_inline-code__Bq7ot">oldest-supported-numpy</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>
package to see what the oldest recommended versions of <code class="code_inline-code__Bq7ot">numpy</code> are.</p><p>(<em>Warning</em>: don’t use <code class="code_inline-code__Bq7ot code_wrap__b41os">pip install -c constraints.txt</code> instead of
<code class="code_inline-code__Bq7ot">PIP_CONSTRAINT</code>, since this isn’t applied to the isolated build environments.)</p><h4 id="source-developers" class="typography_heading__D82WZ typography_h4__CDRaM"><a href="#source-developers" class="heading-text typography_permalink__UiIRy">Additional options for developers <!-- --> </a></h4><p>Some additional options may be useful for spaCy developers who are editing the
source code and recompiling frequently.</p><ul class="list_ul__fe_HF">
<li class="list_li__sfx_z">
<p>Install in editable mode. Changes to <code class="code_inline-code__Bq7ot">.py</code> files will be reflected as soon as
the files are saved, but edits to Cython files (<code class="code_inline-code__Bq7ot">.pxd</code>, <code class="code_inline-code__Bq7ot">.pyx</code>) will require
the <code class="code_inline-code__Bq7ot">pip install</code> command below to be run again. Before installing in editable
mode, be sure you have removed any previous installs with
<code class="code_inline-code__Bq7ot">pip uninstall spacy</code>, which you may need to run multiple times to remove all
traces of earlier installs.</p>
<pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install -r requirements.txt
</span><span data-prompt="$">pip install --no-build-isolation --editable .</span></code></pre>
</li>
<li class="list_li__sfx_z">
<p>Build in parallel. Starting in v3.4.0, you can specify the number of build
jobs with the environment variable <code class="code_inline-code__Bq7ot">SPACY_NUM_BUILD_JOBS</code>:</p>
<pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install -r requirements.txt
</span><span data-prompt="$">SPACY_NUM_BUILD_JOBS=4 pip install --no-build-isolation --editable .</span></code></pre>
</li>
<li class="list_li__sfx_z">
<p>For editable mode and parallel builds with <code class="code_inline-code__Bq7ot">python setup.py</code> instead of <code class="code_inline-code__Bq7ot">pip</code>
(no longer recommended):</p>
<pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">pip install -r requirements.txt
</span><span data-prompt="$">python setup.py build_ext --inplace -j 4
</span><span data-prompt="$">python setup.py develop</span></code></pre>
</li>
</ul><h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">Visual Studio Code extension<!-- --> </span></h4><figure class="gatsby-resp-image-figure"><img class="embed_image__mSQUH" src="/images/spacy-extension-demo.gif" alt="spaCy extension demo" width="650" height="auto"></figure><p>The <a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spacy-vscode"><span class="link_source-text__VDP74">spaCy VSCode Extension</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a> provides
additional tooling and features for working with spaCy’s config files. Version
1.0.0 includes hover descriptions for registry functions, variables, and section
names within the config as an installable extension.</p><ol class="list_ol__aclSa">
<li class="list_li__sfx_z">Install a supported version of Python on your system (<code class="code_inline-code__Bq7ot">>=3.7</code>)</li>
<li class="list_li__sfx_z">Install the
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://code.visualstudio.com/docs/python/python-tutorial">Python Extension for Visual Studio Code</a></li>
<li class="list_li__sfx_z">Create a
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://docs.python.org/3/library/venv.html">virtual python environment</a></li>
<li class="list_li__sfx_z">Install all python requirements (<code class="code_inline-code__Bq7ot">spaCy >= 3.4.0</code> & <code class="code_inline-code__Bq7ot">pygls >= 1.0.0</code>)</li>
<li class="list_li__sfx_z">Install
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://marketplace.visualstudio.com/items?itemName=Explosion.spacy-extension">spaCy extension for Visual Studio Code</a></li>
<li class="list_li__sfx_z">Select your python environment</li>
<li class="list_li__sfx_z">You are ready to work with <code class="code_inline-code__Bq7ot">.cfg</code> files in spaCy!</li>
</ol><h3 id="executable" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#executable" class="heading-text typography_permalink__UiIRy">Building an executable <!-- --> </a></h3><p>The spaCy repository includes a <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/tree/master/Makefile"><code class="code_inline-code__Bq7ot">Makefile</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a> that
builds an executable zip file using <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/pantsbuild/pex"><code class="code_inline-code__Bq7ot">pex</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>
(<strong>P</strong>ython <strong>Ex</strong>ecutable). The executable includes spaCy and all its package
dependencies and only requires the system Python at runtime. Building an
executable <code class="code_inline-code__Bq7ot">.pex</code> file is often the most convenient way to deploy spaCy, as it
lets you separate the build from the deployment process.</p><aside class="aside_root__667WA"><div class="aside_content__ZN6qm" role="complementary"><div class="aside_text__LFH_Q">
<h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">Usage<!-- --> </span></h4>
<p>To use a <code class="code_inline-code__Bq7ot">.pex</code> file, just replace <code class="code_inline-code__Bq7ot">python</code> with the path to the file when you
execute your code or CLI commands. This is equivalent to running Python in a
virtual environment with spaCy installed.</p>
<pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">./spacy.pex my_script.py
</span><span data-prompt="$">./spacy.pex -m spacy info</span></code></pre>
</div></div></aside><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">git clone https://github.com/explosion/spaCy
</span><span data-prompt="$">cd spaCy
</span><span data-prompt="$">make</span></code></pre><p>You can configure the build process with the following environment variables:</p><table class="table_root__ZlA_w"><thead><tr class="table_tr__K_tkF"><th class="table_th__QJ9F8">Variable</th><th class="table_th__QJ9F8">Description</th></tr></thead><tbody><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">SPACY_EXTRAS</code></td><td class="table_td__rmpJx">Additional Python packages to install alongside spaCy with optional version specifications. Should be a string that can be passed to <code class="code_inline-code__Bq7ot">pip install</code>. See <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/tree/master/Makefile"><code class="code_inline-code__Bq7ot">Makefile</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a> for defaults.</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">PYVER</code></td><td class="table_td__rmpJx">The Python version to build against. This version needs to be available on your build and runtime machines. Defaults to <code class="code_inline-code__Bq7ot">3.8</code>.</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx"><code class="code_inline-code__Bq7ot">WHEELHOUSE</code></td><td class="table_td__rmpJx">Directory to store the wheel files during compilation. Defaults to <code class="code_inline-code__Bq7ot">./wheelhouse</code>.</td></tr></tbody></table><h3 id="run-tests" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#run-tests" class="heading-text typography_permalink__UiIRy">Run tests <!-- --> </a></h3><p>spaCy comes with an <a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/tree/master/spacy/tests"><span class="link_source-text__VDP74">extensive test suite</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>. In order
to run the tests, you’ll usually want to clone the <a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/tree/master"><span class="link_source-text__VDP74">repository</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>
and <a class="link_root__1Me7D" href="/usage#source">build spaCy from source</a>. This will also install the required
development dependencies and test utilities defined in the <code class="code_inline-code__Bq7ot">requirements.txt</code>.</p><p>Alternatively, you can find out where spaCy is installed and run <code class="code_inline-code__Bq7ot">pytest</code> on
that directory. Don’t forget to also install the test utilities via spaCy’s
<a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/tree/master/requirements.txt"><code class="code_inline-code__Bq7ot">requirements.txt</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>:</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">python -c "import os; import spacy; print(os.path.dirname(spacy.__file__))"
</span><span data-prompt="$">pip install -r path/to/requirements.txt
</span><span data-prompt="$">python -m pytest --pyargs spacy</span></code></pre><p>Calling <code class="code_inline-code__Bq7ot">pytest</code> on the spaCy directory will run only the basic tests. The flag
<code class="code_inline-code__Bq7ot">--slow</code> is optional and enables additional tests that take longer.</p><pre class="code_pre__kzg60 language-bash" tabindex="0"><code class="code_code__CILJL language-bash"><span data-prompt="$">python -m pip install -U pytest <span class="token comment"># update pytest
</span></span><span data-prompt="$">python -m pytest --pyargs spacy <span class="token comment"># basic tests
</span></span><span data-prompt="$">python -m pytest --pyargs spacy --slow <span class="token comment"># basic and slow tests</span></span></code></pre></section>
<section id="section-troubleshooting" class="section_root__k1hUl"><h2 id="troubleshooting" class="typography_heading__D82WZ typography_h2__hzV3h"><a href="#troubleshooting" class="heading-text typography_permalink__UiIRy">Troubleshooting guide <!-- --> </a></h2><p>This section collects some of the most common errors you may come across when
installing, loading and using spaCy, as well as their solutions. Also see the
<a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/discussions/8226"><span class="link_source-text__VDP74">Discussions FAQ Thread</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>,
which is updated more frequently and covers more transitory issues.</p><aside class="aside_root__667WA"><div class="aside_content__ZN6qm" role="complementary"><div class="aside_text__LFH_Q">
<h4 class="typography_heading__D82WZ typography_h4__CDRaM"><span class="heading-text">Help us improve this guide<!-- --> </span></h4>
<p>Did you come across a problem like the ones listed here and want to share the
solution? You can find the “Suggest edits” button at the bottom of this page
that points you to the source. We always appreciate
<a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/pulls"><span class="link_source-text__VDP74">pull requests</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>!</p>
</div></div></aside><section class="accordion" id="compatible-model"><div class="accordion_root__pPltq"><h4><button class="accordion_button__IPO0E" aria-expanded="false"><span><span class="heading-text">No compatible model found</span></span><svg class="accordion_icon__fpBl7" width="20" height="20" viewBox="0 0 10 10" aria-hidden="true" focusable="false"><rect class="" height="8" width="2" x="4" y="1"></rect><rect height="2" width="8" x="1" y="4"></rect></svg></button></h4><div class="accordion_content__divKS accordion_hidden__tgILw"><pre class="code_pre__kzg60 language-none" tabindex="0"><code class="code_code__CILJL language-none">No compatible package found for [lang] (spaCy vX.X.X).</code></pre><p>This usually means that the trained pipeline you’re trying to download does not
exist, or isn’t available for your version of spaCy. Check the
<a class="link_root__1Me7D link_with-icon__NAVDA" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spacy-models/tree/master/compatibility.json"><span class="link_source-text__VDP74">compatibility table</span><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg></a>
to see which packages are available for your spaCy version. If you’re using an
old version, consider upgrading to the latest release. Note that while spaCy
supports tokenization for <a class="link_root__1Me7D" href="/usage/models#languages">a variety of languages</a>, not
all of them come with trained pipelines. To only use the tokenizer, import the
language’s <code class="code_inline-code__Bq7ot">Language</code> class instead, for example
<code class="code_inline-code__Bq7ot code_wrap__b41os">from spacy.lang.fr import French</code>.</p></div></div></section><section class="accordion" id="import-error"><div class="accordion_root__pPltq"><h4><button class="accordion_button__IPO0E" aria-expanded="false"><span><span class="heading-text">Import error: No module named spacy</span></span><svg class="accordion_icon__fpBl7" width="20" height="20" viewBox="0 0 10 10" aria-hidden="true" focusable="false"><rect class="" height="8" width="2" x="4" y="1"></rect><rect height="2" width="8" x="1" y="4"></rect></svg></button></h4><div class="accordion_content__divKS accordion_hidden__tgILw"><pre class="code_pre__kzg60 language-none" tabindex="0"><code class="code_code__CILJL language-none">Import Error: No module named spacy</code></pre><p>This error means that the spaCy module can’t be located on your system, or in
your environment. Make sure you have spaCy installed. If you’re using a virtual
environment, make sure it’s activated and check that spaCy is installed in that
environment – otherwise, you’re trying to load a system installation. You can
also run <code class="code_inline-code__Bq7ot">which python</code> to find out where your Python executable is located.</p></div></div></section><section class="accordion" id="import-error-models"><div class="accordion_root__pPltq"><h4><button class="accordion_button__IPO0E" aria-expanded="false"><span><span class="heading-text">Import error: No module named [name]</span></span><svg class="accordion_icon__fpBl7" width="20" height="20" viewBox="0 0 10 10" aria-hidden="true" focusable="false"><rect class="" height="8" width="2" x="4" y="1"></rect><rect height="2" width="8" x="1" y="4"></rect></svg></button></h4><div class="accordion_content__divKS accordion_hidden__tgILw"><pre class="code_pre__kzg60 language-none" tabindex="0"><code class="code_code__CILJL language-none">ImportError: No module named 'en_core_web_sm'</code></pre><p>As of spaCy v1.7, all trained pipelines can be installed as Python packages.
This means that they’ll become importable modules of your application. If this
fails, it’s usually a sign that the package is not installed in the current
environment. Run <code class="code_inline-code__Bq7ot">pip list</code> or <code class="code_inline-code__Bq7ot">pip freeze</code> to check which pipeline packages you
have installed, and install the <a class="link_root__1Me7D" href="/models">correct package</a> if necessary. If
you’re importing a package manually at the top of a file, make sure to use the
full name of the package.</p></div></div></section><section class="accordion" id="command-not-found"><div class="accordion_root__pPltq"><h4><button class="accordion_button__IPO0E" aria-expanded="false"><span><span class="heading-text">Command not found: spacy</span></span><svg class="accordion_icon__fpBl7" width="20" height="20" viewBox="0 0 10 10" aria-hidden="true" focusable="false"><rect class="" height="8" width="2" x="4" y="1"></rect><rect height="2" width="8" x="1" y="4"></rect></svg></button></h4><div class="accordion_content__divKS accordion_hidden__tgILw"><pre class="code_pre__kzg60 language-none" tabindex="0"><code class="code_code__CILJL language-none">command not found: spacy</code></pre><p>This error may occur when running the <code class="code_inline-code__Bq7ot">spacy</code> command from the command line.
spaCy does not currently add an entry to your <code class="code_inline-code__Bq7ot">PATH</code> environment variable, as
this can lead to unexpected results, especially when using a virtual
environment. Instead, spaCy adds an auto-alias that maps <code class="code_inline-code__Bq7ot">spacy</code> to
<code class="code_inline-code__Bq7ot">python -m spacy</code>. If this is not working as expected, run the command with
<code class="code_inline-code__Bq7ot">python -m</code>, yourself – for example <code class="code_inline-code__Bq7ot code_wrap__b41os">python -m spacy download en_core_web_sm</code>.
For more info on this, see the <a class="link_root__1Me7D link_nowrap__H7Oxl link_with-icon__NAVDA" href="/api/cli#download"><code class="code_inline-code__Bq7ot">download</code><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 20 20" class="icon_root__EGBLT link_icon__h3DMr icon_inline__1Eo2w" aria-hidden="true"><path d="M15.5 11h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 7h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM10.5 15h-6c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h6c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5zM15.5 3h-11c-0.275 0-0.5 0.225-0.5 0.5v1c0 0.276 0.225 0.5 0.5 0.5h11c0.276 0 0.5-0.224 0.5-0.5v-1c0-0.275-0.224-0.5-0.5-0.5z"></path></svg></a> command.</p></div></div></section><section class="accordion" id="module-load"><div class="accordion_root__pPltq"><h4><button class="accordion_button__IPO0E" aria-expanded="false"><span><span class="heading-text">'module' object has no attribute 'load'</span></span><svg class="accordion_icon__fpBl7" width="20" height="20" viewBox="0 0 10 10" aria-hidden="true" focusable="false"><rect class="" height="8" width="2" x="4" y="1"></rect><rect height="2" width="8" x="1" y="4"></rect></svg></button></h4><div class="accordion_content__divKS accordion_hidden__tgILw"><pre class="code_pre__kzg60 language-none" tabindex="0"><code class="code_code__CILJL language-none">AttributeError: 'module' object has no attribute 'load'</code></pre><p>While this could technically have many causes, including spaCy being broken, the
most likely one is that your script’s file or directory name is “shadowing” the
module – e.g. your file is called <code class="code_inline-code__Bq7ot">spacy.py</code>, or a directory you’re importing
from is called <code class="code_inline-code__Bq7ot">spacy</code>. So, when using spaCy, never call anything else <code class="code_inline-code__Bq7ot">spacy</code>.</p></div></div></section><section class="accordion" id="catastrophic-forgetting"><div class="accordion_root__pPltq"><h4><button class="accordion_button__IPO0E" aria-expanded="false"><span><span class="heading-text">NER model doesn't recognize other entities anymore after training</span></span><svg class="accordion_icon__fpBl7" width="20" height="20" viewBox="0 0 10 10" aria-hidden="true" focusable="false"><rect class="" height="8" width="2" x="4" y="1"></rect><rect height="2" width="8" x="1" y="4"></rect></svg></button></h4><div class="accordion_content__divKS accordion_hidden__tgILw"><p>If your training data only contained new entities and you didn’t mix in any
examples the model previously recognized, it can cause the model to “forget”
what it had previously learned. This is also referred to as the “catastrophic
forgetting problem”. A solution is to pre-label some text, and mix it with the
new text in your updates. You can also do this by running spaCy over some text,
extracting a bunch of entities the model previously recognized correctly, and
adding them to your training examples.</p></div></div></section><section class="accordion" id="unhashable-list"><div class="accordion_root__pPltq"><h4><button class="accordion_button__IPO0E" aria-expanded="false"><span><span class="heading-text">Unhashable type: 'list'</span></span><svg class="accordion_icon__fpBl7" width="20" height="20" viewBox="0 0 10 10" aria-hidden="true" focusable="false"><rect class="" height="8" width="2" x="4" y="1"></rect><rect height="2" width="8" x="1" y="4"></rect></svg></button></h4><div class="accordion_content__divKS accordion_hidden__tgILw"><pre class="code_pre__kzg60 language-none" tabindex="0"><code class="code_code__CILJL language-none">TypeError: unhashable type: 'list'</code></pre><p>If you’re training models, writing them to disk, and versioning them with git,
you might encounter this error when trying to load them in a Windows
environment. This happens because a default install of Git for Windows is
configured to automatically convert Unix-style end-of-line characters (LF) to
Windows-style ones (CRLF) during file checkout (and the reverse when
committing). While that’s mostly fine for text files, a trained model written to
disk has some binary files that should not go through this conversion. When they
do, you get the error above. You can fix it by either changing your
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration"><code class="code_inline-code__Bq7ot">core.autocrlf</code></a>
setting to <code class="code_inline-code__Bq7ot">"false"</code>, or by committing a
<a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://git-scm.com/docs/gitattributes"><code class="code_inline-code__Bq7ot">.gitattributes</code></a> file to your
repository to tell Git on which files or folders it shouldn’t do LF-to-CRLF
conversion, with an entry like <code class="code_inline-code__Bq7ot">path/to/spacy/model/** -text</code>. After you’ve done
either of these, clone your repository again.</p></div></div></section></section>
<section id="section-changelog" class="section_root__k1hUl"><h2 id="changelog" class="typography_heading__D82WZ typography_h2__hzV3h"><a href="#changelog" class="heading-text typography_permalink__UiIRy">Changelog <!-- --> </a></h2><h3 id="changelog-stable" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#changelog-stable" class="heading-text typography_permalink__UiIRy">Stable Releases </a></h3><table class="table_root__ZlA_w"><thead><tr class="table_tr__K_tkF"><th class="table_th__QJ9F8">Date</th><th class="table_th__QJ9F8">Version</th><th class="table_th__QJ9F8">Title</th></tr></thead><tbody><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2024-10-01</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/release-v3.8.2"><code class="code_inline-code__Bq7ot">release-v3.8.2</code></a></td><td class="table_td__rmpJx">Memory management for persistent services, numpy 2.0 support</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2024-06-05</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.7.5"><code class="code_inline-code__Bq7ot">v3.7.5</code></a></td><td class="table_td__rmpJx">Download sanitization, Typer compatibility, and a bugfix for linking gold entities</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2024-02-15</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.7.4"><code class="code_inline-code__Bq7ot">v3.7.4</code></a></td><td class="table_td__rmpJx">New textcat layers and fo/nn language extensions</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-10-16</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.7.2"><code class="code_inline-code__Bq7ot">v3.7.2</code></a></td><td class="table_td__rmpJx">Fixes for APIs and requirements</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-10-05</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.7.1"><code class="code_inline-code__Bq7ot">v3.7.1</code></a></td><td class="table_td__rmpJx">Bug fix for spacy.cli module loading</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-10-02</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.7.0"><code class="code_inline-code__Bq7ot">v3.7.0</code></a></td><td class="table_td__rmpJx">Trained pipelines using Curated Transformers and support for Python 3.12</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-08-08</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.6.1"><code class="code_inline-code__Bq7ot">v3.6.1</code></a></td><td class="table_td__rmpJx">Support for Pydantic v2, find-function CLI and more</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-07-07</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.6.0"><code class="code_inline-code__Bq7ot">v3.6.0</code></a></td><td class="table_td__rmpJx">New span finder component and pipelines for Slovenian</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-06-28</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.5.4"><code class="code_inline-code__Bq7ot">v3.5.4</code></a></td><td class="table_td__rmpJx">Bug fixes for overrides with registered functions and sourced components with listeners</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-05-25</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.3.3"><code class="code_inline-code__Bq7ot">v3.3.3</code></a></td><td class="table_td__rmpJx">Bug fixes for Pydantic and pip</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-05-25</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.2.6"><code class="code_inline-code__Bq7ot">v3.2.6</code></a></td><td class="table_td__rmpJx">Bug fixes for Pydantic and pip</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-05-15</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.5.3"><code class="code_inline-code__Bq7ot">v3.5.3</code></a></td><td class="table_td__rmpJx">Speed improvements, bug fixes and more</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-04-12</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.5.2"><code class="code_inline-code__Bq7ot">v3.5.2</code></a></td><td class="table_td__rmpJx">Pretraining improvements, bug fixes for spans and spancat and more</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-03-10</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.5.1"><code class="code_inline-code__Bq7ot">v3.5.1</code></a></td><td class="table_td__rmpJx">spancat for multi-class labeling, fixes for textcat+transformers and more</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2023-01-20</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.5.0"><code class="code_inline-code__Bq7ot">v3.5.0</code></a></td><td class="table_td__rmpJx">New CLI commands, language updates, bug fixes and much more</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-12-16</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.0.9"><code class="code_inline-code__Bq7ot">v3.0.9</code></a></td><td class="table_td__rmpJx">Bug fixes and future NumPy compatibility</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-12-16</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v2.3.9"><code class="code_inline-code__Bq7ot">v2.3.9</code></a></td><td class="table_td__rmpJx">Compatibility with NumPy v1.24+</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-12-14</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.4.4"><code class="code_inline-code__Bq7ot">v3.4.4</code></a></td><td class="table_td__rmpJx">Bug fixes and future NumPy compatibility</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-12-16</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.3.2"><code class="code_inline-code__Bq7ot">v3.3.2</code></a></td><td class="table_td__rmpJx">Bug fixes and future NumPy compatibility</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-12-16</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.2.5"><code class="code_inline-code__Bq7ot">v3.2.5</code></a></td><td class="table_td__rmpJx">Bug fixes and future NumPy compatibility</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-12-16</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.1.7"><code class="code_inline-code__Bq7ot">v3.1.7</code></a></td><td class="table_td__rmpJx">Bug fixes and future NumPy compatibility</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-11-10</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.4.3"><code class="code_inline-code__Bq7ot">v3.4.3</code></a></td><td class="table_td__rmpJx">Extended Typer support and bug fixes</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-10-20</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.4.2"><code class="code_inline-code__Bq7ot">v3.4.2</code></a></td><td class="table_td__rmpJx">Latin and Luganda support, Python 3.11 wheels and more</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-10-19</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v2.3.8"><code class="code_inline-code__Bq7ot">v2.3.8</code></a></td><td class="table_td__rmpJx">Updates for Python 3.10 and 3.11</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-07-26</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.4.1"><code class="code_inline-code__Bq7ot">v3.4.1</code></a></td><td class="table_td__rmpJx">Fix compatibility with CuPy v9.x</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-07-12</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.4.0"><code class="code_inline-code__Bq7ot">v3.4.0</code></a></td><td class="table_td__rmpJx">Updated types, speed improvements and pipelines for Croatian</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-06-07</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.3.1"><code class="code_inline-code__Bq7ot">v3.3.1</code></a></td><td class="table_td__rmpJx">New Span Ruler component, JSON (de)serialization of Doc, span analyzer and more</td></tr><tr class="table_tr__K_tkF"><td class="table_td__rmpJx table_nowrap__xOWM2"><span class="typography_label__l_oVJ">2022-04-29</span></td><td class="table_td__rmpJx"><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/releases/tag/v3.3.0"><code class="code_inline-code__Bq7ot">v3.3.0</code></a></td><td class="table_td__rmpJx">Improved speed, new trainable lemmatizer, and pipelines for Finnish, Korean and Swedish</td></tr></tbody></table><h3 id="changelog-pre" class="typography_heading__D82WZ typography_h3__mPKmB"><a href="#changelog-pre" class="heading-text typography_permalink__UiIRy">Pre-Releases </a></h3><p>Pre-releases include alpha and beta versions, as well as release candidates. They are not intended for production use. You can download spaCy pre-releases via the <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" href="https://pypi.org/packages/spacy-nightly"><code class="code_inline-code__Bq7ot">spacy-nightly</code></a> package on pip.</p><p><a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" data-tooltip="2024-09-09: Optional memory management for persistent services" href="https://github.com/explosion/spaCy/releases/tag/prerelease-v3.8.0.dev0"><code class="code_inline-code__Bq7ot">prerelease-v3.8.0.dev0</code></a> <a class="link_root__1Me7D" rel="noopener nofollow noreferrer" target="_blank" data-tooltip="2024-08-20: Test pypi release process" href="https://github.com/explosion/spaCy/releases/tag/prerelease-v3.7.6a"><code class="code_inline-code__Bq7ot">prerelease-v3.7.6a</code></a> </p></section><div class="grid_root__EfDZl grid_spacing__fhBCv grid_half__xoJZs"><div style="margin-top:var(--spacing-lg)"><a class="link_root__1Me7D button_root__jwipc button_secondary__ukZAk" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/tree/master/website/docs/usage/index.mdx"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 20 20" class="icon_root__EGBLT icon_inline__1Eo2w" aria-hidden="true"><path d="M5.719 14.75c-0.236 0-0.474-0.083-0.664-0.252l-5.060-4.498 5.341-4.748c0.412-0.365 1.044-0.33 1.411 0.083s0.33 1.045-0.083 1.412l-3.659 3.253 3.378 3.002c0.413 0.367 0.45 0.999 0.083 1.412-0.197 0.223-0.472 0.336-0.747 0.336zM14.664 14.748l5.341-4.748-5.060-4.498c-0.413-0.367-1.045-0.33-1.411 0.083s-0.33 1.045 0.083 1.412l3.378 3.003-3.659 3.252c-0.413 0.367-0.45 0.999-0.083 1.412 0.197 0.223 0.472 0.336 0.747 0.336 0.236 0 0.474-0.083 0.664-0.252zM9.986 16.165l2-12c0.091-0.545-0.277-1.060-0.822-1.151-0.547-0.092-1.061 0.277-1.15 0.822l-2 12c-0.091 0.545 0.277 1.060 0.822 1.151 0.056 0.009 0.11 0.013 0.165 0.013 0.48 0 0.904-0.347 0.985-0.835z"></path></svg>Suggest edits</a></div><a class="link_root__1Me7D readnext_root__JNzwZ link_no-link-layout__RPvod" href="/usage/models"><span><span class="typography_label__l_oVJ">Read next</span>Models & Languages</span><span class="readnext_icon__jfRnJ"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="icon_root__EGBLT" aria-hidden="true"><path d="M20.744 12.669c0 0 0 0 0 0 0.006-0.006 0.006-0.006 0.006-0.006s0 0 0 0 0.006-0.006 0.006-0.006c0 0 0.006-0.006 0.006-0.006s0 0 0 0 0.006-0.006 0.006-0.006c0 0 0 0 0 0 0.063-0.075 0.112-0.156 0.15-0.244 0 0 0 0 0-0.006 0 0 0-0.006 0-0.006s0-0.006 0-0.006c0 0 0 0 0 0 0.038-0.094 0.063-0.194 0.069-0.3 0 0 0 0 0 0s0-0.006 0-0.006c0 0 0-0.006 0-0.006s0-0.006 0-0.006c0 0 0-0.006 0-0.006s0 0 0-0.006c0-0.025 0-0.050 0-0.075 0 0 0 0 0-0.006 0 0 0-0.006 0-0.006s0-0.006 0-0.006c0 0 0-0.006 0-0.006s0-0.006 0-0.006c0 0 0 0 0 0-0.006-0.106-0.031-0.206-0.069-0.3 0 0 0 0 0-0.006 0 0 0 0 0-0.006 0 0 0-0.006-0.006-0.006 0 0 0 0 0 0-0.038-0.094-0.094-0.175-0.156-0.256 0 0 0 0 0 0s-0.006-0.006-0.006-0.006c0 0 0 0 0 0s-0.006-0.006-0.006-0.006-0.006-0.006-0.006-0.006 0 0 0-0.006c-0.012-0.012-0.025-0.025-0.037-0.037l-6-6c-0.387-0.387-1.025-0.387-1.413 0s-0.387 1.025 0 1.413l4.294 4.294h-13.581c-0.55 0-1 0.45-1 1s0.45 1 1 1h13.587l-4.294 4.294c-0.387 0.387-0.387 1.025 0 1.413 0.194 0.194 0.45 0.294 0.706 0.294s0.513-0.1 0.706-0.294l5.994-5.994c0.019-0.025 0.031-0.044 0.044-0.056z"></path></svg></span></a></div></article><div class="main_asides__RITE5" style="background-image:url(/_next/static/media/pattern_blue.d167bed5.png"></div><footer class="footer_root__zlkjP"><div class="grid_root__EfDZl footer_content__LaE1F grid_narrow__x_6xS grid_spacing__fhBCv grid_third__edHuB"><section><ul class="footer_column__DPe22"><li class="footer_label__xK7_s">spaCy</li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/usage">Usage</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/models">Models</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/api">API Reference</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="https://course.spacy.io">Online Course</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="https://explosion.ai/custom-solutions">Custom Solutions</a></li></ul></section><section><ul class="footer_column__DPe22"><li class="footer_label__xK7_s">Community</li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="/universe">Universe</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/discussions">GitHub Discussions</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy/issues">Issue Tracker</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" rel="noopener nofollow noreferrer" target="_blank" href="http://stackoverflow.com/questions/tagged/spacy">Stack Overflow</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="https://explosion.ai/merch">Merchandise</a></li></ul></section><section><ul class="footer_column__DPe22"><li class="footer_label__xK7_s">Connect</li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" rel="noopener nofollow noreferrer" target="_blank" href="https://twitter.com/spacy_io">Twitter</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" rel="noopener nofollow noreferrer" target="_blank" href="https://github.com/explosion/spaCy">GitHub</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" rel="noopener nofollow noreferrer" target="_blank" href="https://youtube.com/c/ExplosionAI">YouTube</a></li><li><a class="link_root__1Me7D link_no-link-layout__RPvod" href="https://explosion.ai/blog">Blog</a></li></ul></section><section class="footer_full___icln"><ul class="footer_column__DPe22"><li class="footer_label__xK7_s">Stay in the loop!</li><li>Receive updates about new releases, tutorials and more.</li><li><form id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" action="//spacy.us12.list-manage.com/subscribe/post?u=83b0498b1e7fa3c91ce68c3f1&amp;id=ecc82e0493" method="post" target="_blank" novalidate=""><div style="position:absolute;left:-5000px" aria-hidden="true"><input type="text" name="b_83b0498b1e7fa3c91ce68c3f1_ecc82e0493" tabindex="-1" value=""></div><div class="newsletter_root__uh6MU"><input class="newsletter_input___SMSB" id="mce-EMAIL" type="email" name="EMAIL" placeholder="Your email" aria-label="Your email"><button class="newsletter_button__gKW8E" id="mc-embedded-subscribe" type="submit" name="subscribe">Sign up</button></div></form></li></ul></section></div><div class="footer_content__LaE1F footer_copy__rbjvc"><span>© 2016-<!-- -->2024<!-- --> <a class="link_root__1Me7D link_no-link-layout__RPvod" href="https://explosion.ai">Explosion</a></span><a class="link_root__1Me7D footer_logo__BthsJ link_no-link-layout__RPvod" aria-label="Explosion" href="https://explosion.ai"><svg height="45" viewBox="0 0 100 100" width="45" xmlns="http://www.w3.org/2000/svg"><path d="M22.8 11.9l1.5 1.7-4.4 3.8 1.8 2 4-3.5 1.4 1.6-4 3.5 1.9 2.2 4.4-3.8 1.5 1.7-6.3 5.5-8-9.3 6.2-5.4zm17.1-1.2l5.9 4.8-2.8.8-4-3.3-1.5 4.9-2.7.8 2.3-7.2-5.6-4.6 2.8-.8 3.7 3 1.5-4.6 2.7-.8-2.3 7zm14.1.9l-.6 4.2-2.5-.4 1.8-12.1 4.9.7c2.6.4 4.1 2 3.7 4.6s-2.3 3.7-4.9 3.3l-2.4-.3zm3.2-5.4l-2.3-.3-.5 3.6 2.3.3c1.3.2 2.1-.5 2.2-1.5.1-1.1-.4-1.9-1.7-2.1zm14.5 2.4l2.2 1.4-5.4 8.4 4.8 3.1-1.2 1.9-7-4.5 6.6-10.3zm6.8 22.8c-1.9-2.9-.9-6.3 2.1-8.3 3.1-2 6.6-1.5 8.5 1.4s1 6.3-2.1 8.3c-3 2-6.6 1.4-8.5-1.4zm8.7-5.7c-1.1-1.6-3.1-1.8-5.1-.5s-2.7 3.3-1.6 4.9 3.2 1.8 5.2.5c1.9-1.3 2.6-3.3 1.5-4.9zm-.1 17c-1 .5-1.4 1.4-1.2 2.6s.8 2 1.8 1.8c.7-.1 1.1-.6 1.2-1.7l.2-2.2c.2-1.8.9-3.3 2.9-3.5 2.2-.3 4 1.3 4.3 3.9.4 2.8-.9 4.6-2.9 5.2l-.3-2.5c.8-.4 1.3-1.2 1.2-2.4-.2-1.1-.8-1.8-1.7-1.7-.7.1-1 .6-1.1 1.5l-.3 2.3c-.2 2-1.2 3.4-3 3.6-2.4.3-4-1.4-4.4-4-.4-2.7.7-4.8 3-5.5l.3 2.6zm-3.8 15.6l.5-2.5 12 2.5-.5 2.5-12-2.5zm-4.7 10.3c1.9-2.9 5.4-3.4 8.5-1.4s4 5.5 2.1 8.3-5.4 3.4-8.5 1.4-4-5.5-2.1-8.3zm8.7 5.6c1.1-1.6.4-3.6-1.7-4.9-2-1.3-4.1-1.2-5.1.5-1.1 1.6-.4 3.6 1.6 4.9 2 1.4 4.1 1.2 5.2-.5zm-24.7 8.1l1.8-1 9.1 4.2-4.1-7.1 2.1-1.2 6.1 10.6-2 1.2-8.6-4 3.9 6.7-2.1 1.2-6.2-10.6zM50 92.2C26.7 92.2 7.8 73.3 7.8 50c0-7.2 1.8-14.3 5.3-20.5.4-.7 1.3-1 2-.6s1 1.3.6 2a39.53 39.53 0 0 0-4.9 19c0 21.6 17.6 39.2 39.2 39.2 2.2 0 4.4-.2 6.6-.5.8-.1 1.6.4 1.7 1.2s-.4 1.6-1.2 1.7c-2.4.5-4.7.7-7.1.7z"></path></svg></a><a class="link_root__1Me7D link_no-link-layout__RPvod" href="https://explosion.ai/legal">Legal / Imprint</a></div></footer></main></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"title":"Install spaCy","next":{"slug":"/usage/models","title":"Models \u0026 Languages"},"menu":[["Quickstart","quickstart"],["Instructions","installation"],["Troubleshooting","troubleshooting"],["Changelog","changelog"]],"slug":"/usage","mdx":{"compiledSource":"/*@jsxRuntime automatic @jsxImportSource react*/\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = Object.assign({\n section: \"section\",\n h2: \"h2\",\n blockquote: \"blockquote\",\n h4: \"h4\",\n p: \"p\",\n a: \"a\",\n strong: \"strong\",\n h3: \"h3\",\n pre: \"pre\",\n code: \"code\",\n table: \"table\",\n thead: \"thead\",\n tr: \"tr\",\n th: \"th\",\n tbody: \"tbody\",\n td: \"td\",\n ul: \"ul\",\n li: \"li\",\n em: \"em\",\n img: \"img\",\n ol: \"ol\"\n }, _provideComponents(), props.components), {QuickstartInstall, InlineCode, Accordion, Changelog} = _components;\n if (!Accordion) _missingMdxReference(\"Accordion\", true);\n if (!Changelog) _missingMdxReference(\"Changelog\", true);\n if (!InlineCode) _missingMdxReference(\"InlineCode\", true);\n if (!QuickstartInstall) _missingMdxReference(\"QuickstartInstall\", true);\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.section, {\n children: [_jsx(_components.h2, {\n hidden: \"true\",\n children: \"Quickstart \"\n }), _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsx(_components.h4, {\n children: \"📖 Looking for the old docs?\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To help you make the transition from v2.x to v3.0, we’ve uploaded the old\\nwebsite to \", _jsx(_components.a, {\n href: \"https://v2.spacy.io/docs\",\n children: _jsx(_components.strong, {\n children: \"v2.spacy.io\"\n })\n }), \". To see what’s changed\\nand how to migrate, see the \", _jsx(_components.a, {\n href: \"/usage/v3\",\n children: \"v3.0 guide\"\n }), \".\"]\n }), \"\\n\"]\n }), _jsx(QuickstartInstall, {\n id: \"quickstart\"\n })]\n }), \"\\n\", _jsxs(_components.section, {\n id: \"section-installation\",\n children: [_jsx(_components.h2, {\n id: \"installation\",\n children: \"Installation instructions \"\n }), _jsxs(_components.p, {\n children: [\"spaCy is compatible with \", _jsx(_components.strong, {\n children: \"64-bit CPython 3.7+\"\n }), \" and runs on \", _jsx(_components.strong, {\n children: \"Unix/Linux\"\n }), \",\\n\", _jsx(_components.strong, {\n children: \"macOS/OS X\"\n }), \" and \", _jsx(_components.strong, {\n children: \"Windows\"\n }), \". The latest spaCy releases are available over\\n\", _jsx(_components.a, {\n href: \"https://pypi.python.org/pypi/spacy\",\n children: \"pip\"\n }), \" and\\n\", _jsx(_components.a, {\n href: \"https://anaconda.org/conda-forge/spacy\",\n children: \"conda\"\n }), \".\"]\n }), _jsx(_components.h3, {\n id: \"pip\",\n children: \"pip \"\n }), _jsxs(_components.p, {\n children: [\"Using pip, spaCy releases are available as source packages and binary wheels.\\nBefore you install spaCy and its dependencies, make sure that your \", _jsx(InlineCode, {\n children: \"pip\"\n }), \",\\n\", _jsx(InlineCode, {\n children: \"setuptools\"\n }), \" and \", _jsx(InlineCode, {\n children: \"wheel\"\n }), \" are up to date.\"]\n }), _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsx(_components.h4, {\n children: \"Download pipelines\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"After installation you typically want to download a trained pipeline. For more\\ninfo and available packages, see the \", _jsx(_components.a, {\n href: \"/models\",\n children: \"models directory\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ python -m spacy download en_core_web_sm\\n\\n\u003e\u003e\u003e import spacy\\n\u003e\u003e\u003e nlp = spacy.load(\\\"en_core_web_sm\\\")\\n\"\n })\n }), \"\\n\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install -U pip setuptools wheel\\n$ pip install -U spacy\\n\"\n })\n }), _jsx(_components.p, {\n children: \"When using pip it is generally recommended to install packages in a virtual\\nenvironment to avoid modifying system state:\"\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ python -m venv .env\\n$ source .env/bin/activate\\n$ pip install -U pip setuptools wheel\\n$ pip install -U spacy\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"spaCy also lets you install extra dependencies by specifying the following\\nkeywords in brackets, e.g. \", _jsx(InlineCode, {\n children: \"spacy[ja]\"\n }), \" or \", _jsx(InlineCode, {\n children: \"spacy[lookups,transformers]\"\n }), \" (with\\nmultiple comma-separated extras). See the \", _jsx(InlineCode, {\n children: \"[options.extras_require]\"\n }), \" section in\\nspaCy’s \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/tree/master/setup.cfg\",\n children: _jsx(InlineCode, {\n children: \"setup.cfg\"\n })\n }), \" for details on what’s included.\"]\n }), _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsx(_components.h4, {\n children: \"Example\"\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install spacy[lookups,transformers]\\n\"\n })\n }), \"\\n\"]\n }), _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Name\"\n }), _jsx(_components.th, {\n children: \"Description\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(InlineCode, {\n children: \"lookups\"\n })\n }), _jsxs(_components.td, {\n children: [\"Install \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spacy-lookups-data\",\n children: _jsx(InlineCode, {\n children: \"spacy-lookups-data\"\n })\n }), \" for data tables for lemmatization and lexeme normalization. The data is serialized with trained pipelines, so you only need this package if you want to train your own models.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(InlineCode, {\n children: \"transformers\"\n })\n }), _jsxs(_components.td, {\n children: [\"Install \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spacy-transformers\",\n children: _jsx(InlineCode, {\n children: \"spacy-transformers\"\n })\n }), \". The package will be installed automatically when you install a transformer-based pipeline.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(InlineCode, {\n children: \"cuda\"\n }), \", …\"]\n }), _jsxs(_components.td, {\n children: [\"Install spaCy with GPU support provided by \", _jsx(_components.a, {\n href: \"https://cupy.chainer.org\",\n children: \"CuPy\"\n }), \" for your given CUDA version. See the GPU \", _jsx(_components.a, {\n href: \"#gpu\",\n children: \"installation instructions\"\n }), \" for details and options.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(InlineCode, {\n children: \"apple\"\n })\n }), _jsxs(_components.td, {\n children: [\"Install \", _jsx(_components.a, {\n href: \"https://github.com/explosion/thinc-apple-ops\",\n children: _jsx(InlineCode, {\n children: \"thinc-apple-ops\"\n })\n }), \" to improve performance on an Apple M1.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(InlineCode, {\n children: \"ja\"\n }), \", \", _jsx(InlineCode, {\n children: \"ko\"\n }), \", \", _jsx(InlineCode, {\n children: \"th\"\n })]\n }), _jsxs(_components.td, {\n children: [\"Install additional dependencies required for tokenization for the \", _jsx(_components.a, {\n href: \"/usage/models#languages\",\n children: \"languages\"\n }), \".\"]\n })]\n })]\n })]\n }), _jsx(_components.h3, {\n id: \"conda\",\n children: \"conda \"\n }), _jsxs(_components.p, {\n children: [\"Thanks to our great community, we’ve been able to re-add conda support. You can\\nalso install spaCy via \", _jsx(InlineCode, {\n children: \"conda-forge\"\n }), \":\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ conda install -c conda-forge spacy\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"For the feedstock including the build recipe and configuration, check out\\n\", _jsx(_components.a, {\n href: \"https://github.com/conda-forge/spacy-feedstock\",\n children: \"this repository\"\n }), \". Note that we\\ncurrently don’t publish any \", _jsx(_components.a, {\n href: \"#changelog-pre\",\n children: \"pre-releases\"\n }), \" on conda.\"]\n }), _jsx(_components.h3, {\n id: \"upgrading\",\n children: \"Upgrading spaCy \"\n }), _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsx(_components.h4, {\n children: \"Upgrading from v2 to v3\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Although we’ve tried to keep breaking changes to a minimum, upgrading from\\nspaCy v2.x to v3.x may still require some changes to your code base. For\\ndetails see the sections on \", _jsx(_components.a, {\n href: \"/usage/v3#incompat\",\n children: \"backwards incompatibilities\"\n }), \"\\nand \", _jsx(_components.a, {\n href: \"/usage/v3#migrating\",\n children: \"migrating\"\n }), \". Also remember to download the new\\ntrained pipelines, and retrain your own pipelines.\"]\n }), \"\\n\"]\n }), _jsxs(_components.p, {\n children: [\"When updating to a newer version of spaCy, it’s generally recommended to start\\nwith a clean virtual environment. If you’re upgrading to a new major version,\\nmake sure you have the latest \", _jsx(_components.strong, {\n children: \"compatible trained pipelines\"\n }), \" installed, and\\nthat there are no old and incompatible packages left over in your environment,\\nas this can often lead to unexpected results and errors. If you’ve trained your\\nown models, keep in mind that your train and runtime inputs must match. This\\nmeans you’ll have to \", _jsx(_components.strong, {\n children: \"retrain your pipelines\"\n }), \" with the new version.\"]\n }), _jsxs(_components.p, {\n children: [\"spaCy also provides a \", _jsx(_components.a, {\n href: \"/api/cli#validate\",\n children: _jsx(InlineCode, {\n children: \"validate\"\n })\n }), \" command, which lets you\\nverify that all installed pipeline packages are compatible with your spaCy\\nversion. If incompatible packages are found, tips and installation instructions\\nare printed. It’s recommended to run the command with \", _jsx(InlineCode, {\n children: \"python -m\"\n }), \" to make sure\\nyou’re executing the correct version of spaCy.\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install -U spacy\\n$ python -m spacy validate\\n\"\n })\n }), _jsx(_components.h3, {\n id: \"gpu\",\n version: \"2.0.14\",\n children: \"Run spaCy with GPU \"\n }), _jsxs(_components.p, {\n children: [\"As of v2.0, spaCy comes with neural network models that are implemented in our\\nmachine learning library, \", _jsx(_components.a, {\n href: \"https://thinc.ai\",\n children: \"Thinc\"\n }), \". For GPU support, we’ve been\\ngrateful to use the work of Chainer’s \", _jsx(_components.a, {\n href: \"https://cupy.chainer.org\",\n children: \"CuPy\"\n }), \" module,\\nwhich provides a numpy-compatible interface for GPU arrays.\"]\n }), _jsxs(_components.p, {\n children: [\"spaCy can be installed for a CUDA-compatible GPU by specifying \", _jsx(InlineCode, {\n children: \"spacy[cuda]\"\n }), \",\\n\", _jsx(InlineCode, {\n children: \"spacy[cuda102]\"\n }), \", \", _jsx(InlineCode, {\n children: \"spacy[cuda112]\"\n }), \", \", _jsx(InlineCode, {\n children: \"spacy[cuda113]\"\n }), \", etc. If you know your CUDA\\nversion, using the more explicit specifier allows CuPy to be installed via\\nwheel, saving some compilation time. The specifiers should install\\n\", _jsx(_components.a, {\n href: \"https://cupy.chainer.org\",\n children: _jsx(InlineCode, {\n children: \"cupy\"\n })\n }), \".\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install -U spacy[cuda113]\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"Once you have a GPU-enabled installation, the best way to activate it is to call\\n\", _jsx(_components.a, {\n href: \"/api/top-level#spacy.prefer_gpu\",\n children: _jsx(InlineCode, {\n children: \"spacy.prefer_gpu\"\n })\n }), \" or\\n\", _jsx(_components.a, {\n href: \"/api/top-level#spacy.require_gpu\",\n children: _jsx(InlineCode, {\n children: \"spacy.require_gpu()\"\n })\n }), \" somewhere in your\\nscript before any pipelines have been loaded. \", _jsx(InlineCode, {\n children: \"require_gpu\"\n }), \" will raise an error\\nif no GPU is available.\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-python\",\n lang: \"python\",\n children: \"import spacy\\n\\nspacy.prefer_gpu()\\nnlp = spacy.load(\\\"en_core_web_sm\\\")\\n\"\n })\n }), _jsx(_components.h3, {\n id: \"source\",\n children: \"Compile from source \"\n }), _jsxs(_components.p, {\n children: [\"The other way to install spaCy is to clone its\\n\", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy\",\n children: \"GitHub repository\"\n }), \" and build it from\\nsource. That is the common way if you want to make changes to the code base.\\nYou’ll need to make sure that you have a development environment consisting of a\\nPython distribution including header files, a compiler,\\n\", _jsx(_components.a, {\n href: \"https://pip.pypa.io/en/stable/\",\n children: \"pip\"\n }), \" and \", _jsx(_components.a, {\n href: \"https://git-scm.com\",\n children: \"git\"\n }), \" installed.\\nThe compiler part is the trickiest. How to do that depends on your system. See\\nnotes on \", _jsx(_components.a, {\n href: \"#source-ubuntu\",\n children: \"Ubuntu\"\n }), \", \", _jsx(_components.a, {\n href: \"#source-osx\",\n children: \"macOS / OS X\"\n }), \" and\\n\", _jsx(_components.a, {\n href: \"#source-windows\",\n children: \"Windows\"\n }), \" for details.\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ python -m pip install -U pip setuptools wheel # install/update build tools\\n$ git clone https://github.com/explosion/spaCy # clone spaCy\\n$ cd spaCy # navigate into dir\\n$ python -m venv .env # create environment in .env\\n$ source .env/bin/activate # activate virtual env\\n$ pip install -r requirements.txt # install requirements\\n$ pip install --no-build-isolation --editable . # compile and install spaCy\\n\"\n })\n }), _jsx(_components.p, {\n children: \"To install with extras:\"\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install --no-build-isolation --editable .[lookups,cuda102]\\n\"\n })\n }), _jsx(_components.p, {\n children: \"How to install compilers and related build tools:\"\n }), _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [_jsx(\"strong\", {\n id: \"source-ubuntu\",\n children: \"Ubuntu:\"\n }), \" Install system-level dependencies via\\n\", _jsx(InlineCode, {\n children: \"apt-get\"\n }), \": \", _jsx(InlineCode, {\n children: \"sudo apt-get install build-essential python-dev git\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(\"strong\", {\n id: \"source-osx\",\n children: \"macOS / OS X:\"\n }), \" Install a recent version of \", _jsx(_components.a, {\n href: \"https://developer.apple.com/xcode/\",\n children: \"XCode\"\n }), \",\\nincluding the so-called “Command Line Tools”. macOS and OS X ship with Python and\\nGit preinstalled.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(\"strong\", {\n id: \"source-windows\",\n children: \"Windows:\"\n }), \" Install a version of the \", _jsx(_components.a, {\n href: \"https://visualstudio.microsoft.com/visual-cpp-build-tools/\",\n children: \"Visual\\nC++ Build Tools\"\n }), \" or\\n\", _jsx(_components.a, {\n href: \"https://www.visualstudio.com/vs/visual-studio-express/\",\n children: \"Visual Studio Express\"\n }), \"\\nthat matches the version that was used to compile your Python interpreter.\"]\n }), \"\\n\"]\n }), _jsx(_components.h4, {\n children: \"Using build constraints when compiling from source\"\n }), _jsxs(_components.p, {\n children: [\"If you install spaCy from source or with \", _jsx(InlineCode, {\n children: \"pip\"\n }), \" for platforms where there are not\\nbinary wheels on PyPI, you may need to use build constraints if any package in\\nyour environment requires an older version of \", _jsx(InlineCode, {\n children: \"numpy\"\n }), \".\"]\n }), _jsxs(_components.p, {\n children: [\"If \", _jsx(InlineCode, {\n children: \"numpy\"\n }), \" gets downgraded from the most recent release at any point after\\nyou’ve compiled \", _jsx(InlineCode, {\n children: \"spacy\"\n }), \", you might see an error that looks like this:\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n lang: \"none\",\n children: \"numpy.ndarray size changed, may indicate binary incompatibility.\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"To fix this, create a new virtual environment and install \", _jsx(InlineCode, {\n children: \"spacy\"\n }), \" and all of its\\ndependencies using build constraints.\\n\", _jsx(_components.a, {\n href: \"https://pip.pypa.io/en/stable/user_guide/#constraints-files\",\n children: \"Build constraints\"\n }), \"\\nspecify an older version of \", _jsx(InlineCode, {\n children: \"numpy\"\n }), \" that is only used while compiling \", _jsx(InlineCode, {\n children: \"spacy\"\n }), \",\\nand then your runtime environment can use any newer version of \", _jsx(InlineCode, {\n children: \"numpy\"\n }), \" and still\\nbe compatible. In addition, use \", _jsx(InlineCode, {\n children: \"--no-cache-dir\"\n }), \" to ignore any previously cached\\nwheels so that all relevant packages are recompiled from scratch:\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-shell\",\n lang: \"shell\",\n children: \"PIP_CONSTRAINT=https://raw.githubusercontent.com/explosion/spacy/master/build-constraints.txt \\\\\\npip install spacy --no-cache-dir\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"Our build constraints currently specify the oldest supported \", _jsx(InlineCode, {\n children: \"numpy\"\n }), \" available\\non PyPI for \", _jsx(InlineCode, {\n children: \"x86_64\"\n }), \" and \", _jsx(InlineCode, {\n children: \"aarch64\"\n }), \". Depending on your platform and environment,\\nyou may want to customize the specific versions of \", _jsx(InlineCode, {\n children: \"numpy\"\n }), \". For other platforms,\\nyou can have a look at SciPy’s\\n\", _jsx(_components.a, {\n href: \"https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg\",\n children: _jsx(InlineCode, {\n children: \"oldest-supported-numpy\"\n })\n }), \"\\npackage to see what the oldest recommended versions of \", _jsx(InlineCode, {\n children: \"numpy\"\n }), \" are.\"]\n }), _jsxs(_components.p, {\n children: [\"(\", _jsx(_components.em, {\n children: \"Warning\"\n }), \": don’t use \", _jsx(InlineCode, {\n children: \"pip install -c constraints.txt\"\n }), \" instead of\\n\", _jsx(InlineCode, {\n children: \"PIP_CONSTRAINT\"\n }), \", since this isn’t applied to the isolated build environments.)\"]\n }), _jsx(_components.h4, {\n id: \"source-developers\",\n children: \"Additional options for developers \"\n }), _jsx(_components.p, {\n children: \"Some additional options may be useful for spaCy developers who are editing the\\nsource code and recompiling frequently.\"\n }), _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Install in editable mode. Changes to \", _jsx(InlineCode, {\n children: \".py\"\n }), \" files will be reflected as soon as\\nthe files are saved, but edits to Cython files (\", _jsx(InlineCode, {\n children: \".pxd\"\n }), \", \", _jsx(InlineCode, {\n children: \".pyx\"\n }), \") will require\\nthe \", _jsx(InlineCode, {\n children: \"pip install\"\n }), \" command below to be run again. Before installing in editable\\nmode, be sure you have removed any previous installs with\\n\", _jsx(InlineCode, {\n children: \"pip uninstall spacy\"\n }), \", which you may need to run multiple times to remove all\\ntraces of earlier installs.\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install -r requirements.txt\\n$ pip install --no-build-isolation --editable .\\n\"\n })\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"Build in parallel. Starting in v3.4.0, you can specify the number of build\\njobs with the environment variable \", _jsx(InlineCode, {\n children: \"SPACY_NUM_BUILD_JOBS\"\n }), \":\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install -r requirements.txt\\n$ SPACY_NUM_BUILD_JOBS=4 pip install --no-build-isolation --editable .\\n\"\n })\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"\\n\", _jsxs(_components.p, {\n children: [\"For editable mode and parallel builds with \", _jsx(InlineCode, {\n children: \"python setup.py\"\n }), \" instead of \", _jsx(InlineCode, {\n children: \"pip\"\n }), \"\\n(no longer recommended):\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ pip install -r requirements.txt\\n$ python setup.py build_ext --inplace -j 4\\n$ python setup.py develop\\n\"\n })\n }), \"\\n\"]\n }), \"\\n\"]\n }), _jsx(_components.h4, {\n children: \"Visual Studio Code extension\"\n }), _jsx(_components.img, {\n src: \"/images/spacy-extension-demo.gif\",\n alt: \"spaCy extension demo\"\n }), _jsxs(_components.p, {\n children: [\"The \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spacy-vscode\",\n children: \"spaCy VSCode Extension\"\n }), \" provides\\nadditional tooling and features for working with spaCy’s config files. Version\\n1.0.0 includes hover descriptions for registry functions, variables, and section\\nnames within the config as an installable extension.\"]\n }), _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Install a supported version of Python on your system (\", _jsx(InlineCode, {\n children: \"\u003e=3.7\"\n }), \")\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Install the\\n\", _jsx(_components.a, {\n href: \"https://code.visualstudio.com/docs/python/python-tutorial\",\n children: \"Python Extension for Visual Studio Code\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Create a\\n\", _jsx(_components.a, {\n href: \"https://docs.python.org/3/library/venv.html\",\n children: \"virtual python environment\"\n })]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Install all python requirements (\", _jsx(InlineCode, {\n children: \"spaCy \u003e= 3.4.0\"\n }), \" \u0026 \", _jsx(InlineCode, {\n children: \"pygls \u003e= 1.0.0\"\n }), \")\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Install\\n\", _jsx(_components.a, {\n href: \"https://marketplace.visualstudio.com/items?itemName=Explosion.spacy-extension\",\n children: \"spaCy extension for Visual Studio Code\"\n })]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Select your python environment\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"You are ready to work with \", _jsx(InlineCode, {\n children: \".cfg\"\n }), \" files in spaCy!\"]\n }), \"\\n\"]\n }), _jsx(_components.h3, {\n id: \"executable\",\n children: \"Building an executable \"\n }), _jsxs(_components.p, {\n children: [\"The spaCy repository includes a \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/tree/master/Makefile\",\n children: _jsx(InlineCode, {\n children: \"Makefile\"\n })\n }), \" that\\nbuilds an executable zip file using \", _jsx(_components.a, {\n href: \"https://github.com/pantsbuild/pex\",\n children: _jsx(InlineCode, {\n children: \"pex\"\n })\n }), \"\\n(\", _jsx(_components.strong, {\n children: \"P\"\n }), \"ython \", _jsx(_components.strong, {\n children: \"Ex\"\n }), \"ecutable). The executable includes spaCy and all its package\\ndependencies and only requires the system Python at runtime. Building an\\nexecutable \", _jsx(InlineCode, {\n children: \".pex\"\n }), \" file is often the most convenient way to deploy spaCy, as it\\nlets you separate the build from the deployment process.\"]\n }), _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsx(_components.h4, {\n children: \"Usage\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To use a \", _jsx(InlineCode, {\n children: \".pex\"\n }), \" file, just replace \", _jsx(InlineCode, {\n children: \"python\"\n }), \" with the path to the file when you\\nexecute your code or CLI commands. This is equivalent to running Python in a\\nvirtual environment with spaCy installed.\"]\n }), \"\\n\", _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ ./spacy.pex my_script.py\\n$ ./spacy.pex -m spacy info\\n\"\n })\n }), \"\\n\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ git clone https://github.com/explosion/spaCy\\n$ cd spaCy\\n$ make\\n\"\n })\n }), _jsx(_components.p, {\n children: \"You can configure the build process with the following environment variables:\"\n }), _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Variable\"\n }), _jsx(_components.th, {\n children: \"Description\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(InlineCode, {\n children: \"SPACY_EXTRAS\"\n })\n }), _jsxs(_components.td, {\n children: [\"Additional Python packages to install alongside spaCy with optional version specifications. Should be a string that can be passed to \", _jsx(InlineCode, {\n children: \"pip install\"\n }), \". See \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/tree/master/Makefile\",\n children: _jsx(InlineCode, {\n children: \"Makefile\"\n })\n }), \" for defaults.\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(InlineCode, {\n children: \"PYVER\"\n })\n }), _jsxs(_components.td, {\n children: [\"The Python version to build against. This version needs to be available on your build and runtime machines. Defaults to \", _jsx(InlineCode, {\n children: \"3.8\"\n }), \".\"]\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: _jsx(InlineCode, {\n children: \"WHEELHOUSE\"\n })\n }), _jsxs(_components.td, {\n children: [\"Directory to store the wheel files during compilation. Defaults to \", _jsx(InlineCode, {\n children: \"./wheelhouse\"\n }), \".\"]\n })]\n })]\n })]\n }), _jsx(_components.h3, {\n id: \"run-tests\",\n children: \"Run tests \"\n }), _jsxs(_components.p, {\n children: [\"spaCy comes with an \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/tree/master/spacy/tests\",\n children: \"extensive test suite\"\n }), \". In order\\nto run the tests, you’ll usually want to clone the \", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/tree/master\",\n children: \"repository\"\n }), \"\\nand \", _jsx(_components.a, {\n href: \"#source\",\n children: \"build spaCy from source\"\n }), \". This will also install the required\\ndevelopment dependencies and test utilities defined in the \", _jsx(InlineCode, {\n children: \"requirements.txt\"\n }), \".\"]\n }), _jsxs(_components.p, {\n children: [\"Alternatively, you can find out where spaCy is installed and run \", _jsx(InlineCode, {\n children: \"pytest\"\n }), \" on\\nthat directory. Don’t forget to also install the test utilities via spaCy’s\\n\", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/tree/master/requirements.txt\",\n children: _jsx(InlineCode, {\n children: \"requirements.txt\"\n })\n }), \":\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ python -c \\\"import os; import spacy; print(os.path.dirname(spacy.__file__))\\\"\\n$ pip install -r path/to/requirements.txt\\n$ python -m pytest --pyargs spacy\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"Calling \", _jsx(InlineCode, {\n children: \"pytest\"\n }), \" on the spaCy directory will run only the basic tests. The flag\\n\", _jsx(InlineCode, {\n children: \"--slow\"\n }), \" is optional and enables additional tests that take longer.\"]\n }), _jsx(_components.pre, {\n children: _jsx(_components.code, {\n className: \"language-bash\",\n lang: \"bash\",\n children: \"$ python -m pip install -U pytest # update pytest\\n$ python -m pytest --pyargs spacy # basic tests\\n$ python -m pytest --pyargs spacy --slow # basic and slow tests\\n\"\n })\n })]\n }), \"\\n\", _jsxs(_components.section, {\n id: \"section-troubleshooting\",\n children: [_jsx(_components.h2, {\n id: \"troubleshooting\",\n children: \"Troubleshooting guide \"\n }), _jsxs(_components.p, {\n children: [\"This section collects some of the most common errors you may come across when\\ninstalling, loading and using spaCy, as well as their solutions. Also see the\\n\", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/discussions/8226\",\n children: \"Discussions FAQ Thread\"\n }), \",\\nwhich is updated more frequently and covers more transitory issues.\"]\n }), _jsxs(_components.blockquote, {\n children: [\"\\n\", _jsx(_components.h4, {\n children: \"Help us improve this guide\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Did you come across a problem like the ones listed here and want to share the\\nsolution? You can find the “Suggest edits” button at the bottom of this page\\nthat points you to the source. We always appreciate\\n\", _jsx(_components.a, {\n href: \"https://github.com/explosion/spaCy/pulls\",\n children: \"pull requests\"\n }), \"!\"]\n }), \"\\n\"]\n }), _jsxs(Accordion, {\n title: \"No compatible model found\",\n id: \"compatible-model\",\n children: [_jsx(_components.pre, {\n children: _jsx(_components.code, {\n lang: \"none\",\n children: \"No compatible package found for [lang] (spaCy vX.X.X).\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"This usually means that the trained pipeline you’re trying to download does not\\nexist, or isn’t available for your version of spaCy. Check the\\n\", _jsx(_components.a, {\n href: \"https://github.com/explosion/spacy-models/tree/master/compatibility.json\",\n children: \"compatibility table\"\n }), \"\\nto see which packages are available for your spaCy version. If you’re using an\\nold version, consider upgrading to the latest release. Note that while spaCy\\nsupports tokenization for \", _jsx(_components.a, {\n href: \"/usage/models#languages\",\n children: \"a variety of languages\"\n }), \", not\\nall of them come with trained pipelines. To only use the tokenizer, import the\\nlanguage’s \", _jsx(InlineCode, {\n children: \"Language\"\n }), \" class instead, for example\\n\", _jsx(InlineCode, {\n children: \"from spacy.lang.fr import French\"\n }), \".\"]\n })]\n }), _jsxs(Accordion, {\n title: \"Import error: No module named spacy\",\n id: \"import-error\",\n children: [_jsx(_components.pre, {\n children: _jsx(_components.code, {\n lang: \"none\",\n children: \"Import Error: No module named spacy\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"This error means that the spaCy module can’t be located on your system, or in\\nyour environment. Make sure you have spaCy installed. If you’re using a virtual\\nenvironment, make sure it’s activated and check that spaCy is installed in that\\nenvironment – otherwise, you’re trying to load a system installation. You can\\nalso run \", _jsx(InlineCode, {\n children: \"which python\"\n }), \" to find out where your Python executable is located.\"]\n })]\n }), _jsxs(Accordion, {\n title: \"Import error: No module named [name]\",\n id: \"import-error-models\",\n children: [_jsx(_components.pre, {\n children: _jsx(_components.code, {\n lang: \"none\",\n children: \"ImportError: No module named 'en_core_web_sm'\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"As of spaCy v1.7, all trained pipelines can be installed as Python packages.\\nThis means that they’ll become importable modules of your application. If this\\nfails, it’s usually a sign that the package is not installed in the current\\nenvironment. Run \", _jsx(InlineCode, {\n children: \"pip list\"\n }), \" or \", _jsx(InlineCode, {\n children: \"pip freeze\"\n }), \" to check which pipeline packages you\\nhave installed, and install the \", _jsx(_components.a, {\n href: \"/models\",\n children: \"correct package\"\n }), \" if necessary. If\\nyou’re importing a package manually at the top of a file, make sure to use the\\nfull name of the package.\"]\n })]\n }), _jsxs(Accordion, {\n title: \"Command not found: spacy\",\n id: \"command-not-found\",\n children: [_jsx(_components.pre, {\n children: _jsx(_components.code, {\n lang: \"none\",\n children: \"command not found: spacy\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"This error may occur when running the \", _jsx(InlineCode, {\n children: \"spacy\"\n }), \" command from the command line.\\nspaCy does not currently add an entry to your \", _jsx(InlineCode, {\n children: \"PATH\"\n }), \" environment variable, as\\nthis can lead to unexpected results, especially when using a virtual\\nenvironment. Instead, spaCy adds an auto-alias that maps \", _jsx(InlineCode, {\n children: \"spacy\"\n }), \" to\\n\", _jsx(InlineCode, {\n children: \"python -m spacy\"\n }), \". If this is not working as expected, run the command with\\n\", _jsx(InlineCode, {\n children: \"python -m\"\n }), \", yourself – for example \", _jsx(InlineCode, {\n children: \"python -m spacy download en_core_web_sm\"\n }), \".\\nFor more info on this, see the \", _jsx(_components.a, {\n href: \"/api/cli#download\",\n children: _jsx(InlineCode, {\n children: \"download\"\n })\n }), \" command.\"]\n })]\n }), _jsxs(Accordion, {\n title: \"'module' object has no attribute 'load'\",\n id: \"module-load\",\n children: [_jsx(_components.pre, {\n children: _jsx(_components.code, {\n lang: \"none\",\n children: \"AttributeError: 'module' object has no attribute 'load'\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"While this could technically have many causes, including spaCy being broken, the\\nmost likely one is that your script’s file or directory name is “shadowing” the\\nmodule – e.g. your file is called \", _jsx(InlineCode, {\n children: \"spacy.py\"\n }), \", or a directory you’re importing\\nfrom is called \", _jsx(InlineCode, {\n children: \"spacy\"\n }), \". So, when using spaCy, never call anything else \", _jsx(InlineCode, {\n children: \"spacy\"\n }), \".\"]\n })]\n }), _jsx(Accordion, {\n title: \"NER model doesn't recognize other entities anymore after training\",\n id: \"catastrophic-forgetting\",\n children: _jsx(_components.p, {\n children: \"If your training data only contained new entities and you didn’t mix in any\\nexamples the model previously recognized, it can cause the model to “forget”\\nwhat it had previously learned. This is also referred to as the “catastrophic\\nforgetting problem”. A solution is to pre-label some text, and mix it with the\\nnew text in your updates. You can also do this by running spaCy over some text,\\nextracting a bunch of entities the model previously recognized correctly, and\\nadding them to your training examples.\"\n })\n }), _jsxs(Accordion, {\n title: \"Unhashable type: 'list'\",\n id: \"unhashable-list\",\n children: [_jsx(_components.pre, {\n children: _jsx(_components.code, {\n lang: \"none\",\n children: \"TypeError: unhashable type: 'list'\\n\"\n })\n }), _jsxs(_components.p, {\n children: [\"If you’re training models, writing them to disk, and versioning them with git,\\nyou might encounter this error when trying to load them in a Windows\\nenvironment. This happens because a default install of Git for Windows is\\nconfigured to automatically convert Unix-style end-of-line characters (LF) to\\nWindows-style ones (CRLF) during file checkout (and the reverse when\\ncommitting). While that’s mostly fine for text files, a trained model written to\\ndisk has some binary files that should not go through this conversion. When they\\ndo, you get the error above. You can fix it by either changing your\\n\", _jsx(_components.a, {\n href: \"https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration\",\n children: _jsx(InlineCode, {\n children: \"core.autocrlf\"\n })\n }), \"\\nsetting to \", _jsx(InlineCode, {\n children: \"\\\"false\\\"\"\n }), \", or by committing a\\n\", _jsx(_components.a, {\n href: \"https://git-scm.com/docs/gitattributes\",\n children: _jsx(InlineCode, {\n children: \".gitattributes\"\n })\n }), \" file to your\\nrepository to tell Git on which files or folders it shouldn’t do LF-to-CRLF\\nconversion, with an entry like \", _jsx(InlineCode, {\n children: \"path/to/spacy/model/** -text\"\n }), \". After you’ve done\\neither of these, clone your repository again.\"]\n })]\n })]\n }), \"\\n\", _jsxs(_components.section, {\n id: \"section-changelog\",\n children: [_jsx(_components.h2, {\n id: \"changelog\",\n children: \"Changelog \"\n }), _jsx(Changelog, {})]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = Object.assign({}, _provideComponents(), props.components);\n return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {\n children: _jsx(_createMdxContent, props)\n })) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{"title":"Install spaCy","next":"/usage/models","menu":[["Quickstart","quickstart"],["Instructions","installation"],["Troubleshooting","troubleshooting"],["Changelog","changelog"]]},"scope":{}},"sectionTitle":"Usage Documentation","theme":"blue","section":"usage","apiDetails":{"stringName":null,"baseClass":null,"trainable":null},"isIndex":true},"__N_SSG":true},"page":"/[...listPathPage]","query":{"listPathPage":["usage"]},"buildId":"mcRyF2evOJ0_ezPiVrnUF","isFallback":false,"dynamicIds":[728],"gsp":true,"scriptLoader":[]}</script><script src="https://plausible.io/js/plausible.js" async="true" defer="true" data-domain="spacy.io" data-nscript="afterInteractive"></script><script id="next-plausible-init" data-nscript="afterInteractive">window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script><next-route-announcer><p aria-live="assertive" id="__next-route-announcer__" role="alert" style="border: 0px; clip: rect(0px, 0px, 0px, 0px); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; white-space: nowrap; overflow-wrap: normal;"></p></next-route-announcer><script src="/_next/static/chunks/pages/index-64945f983a5fb9c7.js"></script><script src="/_next/static/chunks/pages/universe-def195243a6963bb.js"></script></body></html>