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 ?