0

I'm working on a NLP project using Jupyter Notebook and Python 3. I use the spacy library for lemmatization. I would like to use the spacy 'en' model. In Python, this would be:

import spacy
nlp = spacy.load('en')

For this to work, I should first download the 'en' model. In command line, this would be:

python3 -m spacy download en

After doing this in command line, it worked well when executing code in Spyder for instance, but not in Jupyter Notebook.

The first idea I had was to use a command like this one in Jupyter Notebook:

!python3 -m spacy download en

as it is possible to use the exclamation mark to execute pip commands in Jupyter Notebook. It did not work out.

The second idea I had was to create a cell with this command:

% bash
python3 -m spacy download en

but it did not work out either.

So my question is: How can I execute this Python3 command so that the spacy 'en' model is downloaded in Jupyter Notebook too ?

1 Answer 1

0

I faced same problem. Try this command. I think it will work.

conda install -c spacy spacy 

You can do it manually. Copy all spacy folder from C:\Program Files (x86)\Python36-32\Lib\site-packages to C:\Users\Name\Anaconda3\Lib\site-packages.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.