Nicolai MC
Nicolai MC

Reputation: 29

How can I create a shortcut link to spacy?

I'm currently enrolled at a Python course, where the lecturer has asked us to download the spaCy package and subsequently create a shortcut link using the following commands:

1) pip install spacy 2) python -m spacy download en_core_web_lg 3) python -m spacy link en_core_web_lg en_default

The "pip command" does not work for me, however, so I used a "conda command" instead: conda install -c conda-forge spacy-model-en_core_web_lg

This worked. But I still cannot create the shortcut link (no 3). So right now, I cannot use the collection of NLP stuff in jupyter notebook.

The aim is to do the following two steps in jupyter:

1) import spacy 2) nlp = spacy.load("en_core_web_lg")

Does anyone know how to create a shortcut link to spacy using a conda command? I am using Windows 10 and Python 3.8 btw.

Thanks!

Upvotes: 0

Views: 812

Answers (1)

Windowlicker
Windowlicker

Reputation: 590

That's interesting. If you really aim at using the model by means of spacy.load("en_core_web_lg"), you don't actually need to set the link. See https://spacy.io/usage/models for some explanations.

Other than that, you don't state why "the pip command does not work". This should be running pretty straight forward (explicitly using version 2.2.3 to avoid the model not being available, yet, for the newly released version 2.2.4):

python3 -m pip install -Iv spacy==2.2.3
python3 -m spacy download en_core_web_lg
python3 -m spacy link en_core_web_lg en_default

With this, you should be ready to use the model by means of spacy.load("en_default").

Upvotes: 0

Related Questions