pythonspacy

Getting error while loading spacy - 'en_core_web_sm' library


I have tried running below commands, it shows as requirement already satisfied but I am still not able load 'en_core_web_sm'. I have tried downloading the library from anaconda prompt and jupyter notebook as well.

 nlp = spacy.load('en_core_web_sm',disable=['ner','textcat'])

Python version - Python 3.8.3

Any help would be greatly appreciated.

Screenshot of Commands:

commands

Screenshot of error:

error

Screenshot of anaconda prompt:

enter image description here


Solution

  • you need to install the en_core_web_sm model separately by using the following command after installing spacy

    python -m spacy download en_core_web_sm
    

    or

    python -m spacy download en
    

    I have tried the below steps in my jupyter notebook just now and it works good as below:

    step1:

    !pip install spacy
    

    Result:

    Requirement already satisfied: spacy in c:\users\user\appdata\local\continuum\anaconda\lib\site-packages (2.3.2)
    

    step2:

    !python -m spacy download en_core_web_sm
    

    Result:

    Collecting en_core_web_sm==2.3.1 from https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz#egg=en_core_web_sm==2.3.1
      Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.1/en_core_web_sm-2.3.1.tar.gz (12.0MB)