close

[Solved] OSError: [E050] Can’t find model ‘en_core_web_sm’

Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to use spacy But I am facing following error OSError: [E050] Can’t find model ‘en_core_web_sm’ in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How OSError: [E050] Can’t find model ‘en_core_web_sm’ Error Occurs ?

I am trying to use spacy as below.

spacy.load('en_core_web_sm')

But I am facing following error.

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

How To Solve OSError: [E050] Can’t find model ‘en_core_web_sm’ Error ?

  1. How To Solve OSError: [E050] Can’t find model ‘en_core_web_sm’ Error ?

    To Solve OSError: [E050] Can’t find model ‘en_core_web_sm’ In my Case I just run this command and my error was fixed. Just run this command. python -m spacy download en. Second solution is You need assign full path where en_core_web_sm is downloaded. Here is how.

  2. OSError: [E050] Can’t find model ‘en_core_web_sm’

    To Solve OSError: [E050] Can’t find model ‘en_core_web_sm’ In my Case I just run this command and my error was fixed. Just run this command. python -m spacy download en. Second solution is You need assign full path where en_core_web_sm is downloaded. Here is how.

Solution 1: Just Use this command

In my Case I just run this command and my error was fixed. Just run this command.

python -m spacy download en

Solution 2: import like this

Just import en_core_web_sm Like this.

import en_core_web_sm

nlp = en_core_web_sm.load()

Solution 3: Assign full path to spacy.load

You need assign full path where en_core_web_sm is downloaded. Here is how.

in my case en_core_web_sm is downloaded path is C:\Users\ssc\AppData\Local\Continuum\anaconda3\Lib\site-packages\en_core_web_sm\en_core_web_sm-2.2.0.

nlp = spacy.load(r'C:\Users\ssc\AppData\Local\Continuum\anaconda3\Lib\site-packages\en_core_web_sm\en_core_web_sm-2.2.0')

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment