How to install SpaCy (NLP Library) on Mac


In order to install SpaCy the open-source natural language processing (NLP) library for analyzing textual data follow the below steps.


Using conda

  1. Open Terminal.
  2. Type the commands,
    % conda install -c conda-forge spacy
    % python -m spacy download en_core_web_sm

    You can also create a new virtual environment and get spaCy installed in it by running the below commands before the above one.

    conda create -n venv
    conda activate venv

Using pip

    % pip install -U pip setuptools wheel
    % pip install -U spacy
    % python -m spacy download en_core_web_sm

    If you are using the M1/M2 Apple Silicon ARM Chip based Mac's

    pip install -U pip setuptools wheel
    pip install -U 'spacy[apple]'
    python -m spacy download en_core_web_sm

You can add trained pipelines in other languages as well, below is the list available till April 2023

Catalan: ca_core_news_sm
Chinese: zh_core_web_sm
Croatian: hr_core_news_sm
Danish: da_core_news_sm
Dutch: nl_core_news_sm
English: en_core_web_sm
Finnish: fi_core_news_sm
French: fr_core_news_sm
German: de_core_news_sm
Greek: el_core_news_sm
Italian: it_core_news_sm
Japanese: ja_core_news_sm
Korean: ko_core_news_sm
Lithuanian: lt_core_news_sm
Macedonian: mk_core_news_sm
Multi-language: xx_ent_wiki_sm
Norwegian Bokmål: nb_core_news_sm
Polish: pl_core_news_sm
Portuguese: pt_core_news_sm
Romanian: ro_core_news_sm
Russian: ru_core_news_sm
Spanish: es_core_news_sm
Swedish: sv_core_news_sm
Ukrainian: uk_core_news_sm
The official installation page: https://spacy.io/usage
Installing spaCy NPL Module on Mac
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author Info:

Rakesh (He/Him) is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap