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

**URL:** <https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707>\
**Category:** Rasa Open Source\
**Created:** [October 12, 2019, 11:05pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707 "2019-10-12T23:05:16Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanchit](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Sanchit](https://forum.rasa.com/u/Sanchit)\
**Post date:** [October 12, 2019, 11:05pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/1 "2019-10-12T23:05:16Z")

</div>

I am trying to train the model but i am getting this error

```auto
Traceback (most recent call last):
  File "C:/Users/sanchit/PycharmProjects/chatbots/nlu_model.py", line 18, in <module>
    train_nlu("./data/data.json", "config_spacy.json", "./models/nlu")
  File "C:/Users/sanchit/PycharmProjects/chatbots/nlu_model.py", line 12, in train_nlu
    trainer = Trainer(config.load(config_file))
  File "C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\model.py", line 150, in __init__
    self.pipeline = self._build_pipeline(cfg, component_builder)
  File "C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\model.py", line 162, in _build_pipeline
    component = component_builder.create_component(component_cfg, cfg)
  File "C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\components.py", line 448, in create_component
    component_config, cfg)
  File "C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\registry.py", line 186, in create_component_by_config
    return component_class.create(component_config, config)
  File "C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\rasa_nlu\utils\spacy_utils.py", line 64, in create
    nlp = spacy.load(spacy_model_name, disable=['parser'])
  File "C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\spacy\ __init__.py", line 27, in load
    return util.load_model(name, **overrides)
  File "C:\Users\sanchit\PycharmProjects\chatbots\venv\lib\site-packages\spacy\util.py", line 171, in load_model
    raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Process finished with exit code 1

```

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 14, 2019, 7:44am UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/2 "2019-10-14T07:44:46Z")

</div>

You are using spacy in your pipeline components, but you did not download the corresponding spacy model. Take a look at [Installation](https://rasa.com/docs/rasa/user-guide/installation/#dependencies-for-spacy) to get instructions on how to install the dependencies for spacy.

---

<div class="post-metadata">

**Author:** ![Sanchit](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Sanchit](https://forum.rasa.com/u/Sanchit)\
**Post date:** [October 14, 2019, 10:30am UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/3 "2019-10-14T10:30:22Z")

</div>

Thank for the replying Tanja, but i have already tried this. I think the problem is something else.

---

<div class="post-metadata">

**Author:** ![Sanchit](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Sanchit](https://forum.rasa.com/u/Sanchit)\
**Post date:** [October 14, 2019, 10:31am UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/4 "2019-10-14T10:31:42Z")

</div>

Hey BTW do you any trouble shooting for that error ValueError: dictionary update sequence element #0 has length 1; 2 is required

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 14, 2019, 11:52am UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/5 "2019-10-14T11:52:30Z")

</div>

Can you please try the following? Open a terminal, open a python console (`python`) and execute:

```auto
import spacy
spacy.load("en")

```

If you are using a virtualenv for rasa, please use that environment. Can the spacy model be loaded?

Regarding the other error: Can you please past the full stack trace?

---

<div class="post-metadata">

**Author:** ![Sanchit](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Sanchit](https://forum.rasa.com/u/Sanchit)\
**Post date:** [October 14, 2019, 12:44pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/6 "2019-10-14T12:44:15Z")

</div>

Yeah Tanja that’s the issue when I am trying to run that command its giving me the first error

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

It might be the issue with my PC.

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 14, 2019, 12:57pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/7 "2019-10-14T12:57:51Z")

</div>

Can you load the “en\_core\_web\_md” model (e.g. `spacy.load("en_core_web_md")`)? If yes, just the link is broken.

---

<div class="post-metadata">

**Author:** ![Sanchit](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Sanchit](https://forum.rasa.com/u/Sanchit)\
**Post date:** [October 14, 2019, 1:12pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/8 "2019-10-14T13:12:55Z")

</div>

yes Tanja that command was working absolutely fine. So that means the link is broken . any suggestion how can I solve this?

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 14, 2019, 1:56pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/9 "2019-10-14T13:56:38Z")

</div>

Maybe this helps: [python - Spacy link error - Stack Overflow](https://stackoverflow.com/questions/43459437/spacy-link-error) or [en model not loading · Issue #1283 · explosion/spaCy · GitHub](https://github.com/explosion/spaCy/issues/1283)

They suggest to run the link command as admin.

---

<div class="post-metadata">

**Author:** ![Sanchit](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Sanchit](https://forum.rasa.com/u/Sanchit)\
**Post date:** [October 14, 2019, 4:28pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/10 "2019-10-14T16:28:37Z")

</div>

thanks Tanja i look into both of the answers that you have provided. I followed the github one. so as ines said on github import en\_core\_web\_sm nlp = en\_core\_web\_sm.load() Those commands were running successfully so it means the model was installed correctly. And I am still facing that issue. And yes I am running commands as Admin.

---

<div class="post-metadata">

**Author:** ![Tanja](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/tanja/32/4696_2.png) [@Tanja](https://forum.rasa.com/u/Tanja)\
**Post date:** [October 15, 2019, 6:30am UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/11 "2019-10-15T06:30:10Z")

</div>

Not sure why it is not working. Did you already took a look at the documentation of spacy ([https://spacy.io/usage/models#usage-link](https://spacy.io/usage/models#usage-link))? Otherwise, I would advise you to maybe ask the question on [Newest 'spacy' Questions - Stack Overflow](https://stackoverflow.com/questions/tagged/spacy).

---

<div class="post-metadata">

**Author:** ![canerbaran](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@canerbaran](https://forum.rasa.com/u/canerbaran)\
**Post date:** [January 18, 2020, 1:19pm UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/12 "2020-01-18T13:19:09Z")

</div>

I have had some problem. I had realized that the spacy en\_core\_web\_md model had not installed to venv lib file despite I had run the:

> `python -m spacy download en_core_web_md`

> `python -m spacy link en_core_web_md en`

codes. The solution is installing the models with admin privileges with sudo before the codes while the venv is activated.

I mean:

> `sudo python -m spacy download en_core_web_md`

> `sudo python -m spacy link en_core_web_md en`

---

<div class="post-metadata">

**Author:** ![ankit025jain](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@ankit025jain](https://forum.rasa.com/u/ankit025jain)\
**Post date:** [August 26, 2020, 10:40am UTC](https://forum.rasa.com/t/oserror-e050-cant-find-model-en-it-doesnt-seem-to-be-a-shortcut-link-a-python-package-or-a-valid-path-to-a-data-directory/19707/13 "2020-08-26T10:40:04Z")

</div>

Open command prompt or terminal and execute the below code:

`pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.2.0/en_core_web_sm-2.2.0.tar.gz`

Execute the below chunk in your Jupiter notebook.

`import spacy`

`nlp = spacy.load('en_core_web_sm')`

Hope the above code works for all:)
