Reputation: 11
I have already installed the Rasa and spacy. But when i try to download by below command
python -m spacy download en_core_web_md
On my Mac it says:
/usr/bin/python: No module named spacy
Could you please advise how to achieve it.
I also tried below options but still the same issue:
For macOS:
You can create the virtual environment by opening the command prompt and typing the following code:
$ python3 -m venv --system-site-packages ./venv
You can activate the virtual environment by typing the following code:
$ source ./venv/bin/activate
Installing Rasa and Rasa X:
You can install both Rasa and Rasa X using the following code:
$ pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
Use the following code only if you want to install Rasa:
$ pip install rasa
Install Rasa NLU and Spacy in the same command prompt:
$ pip install rasa[spacy]
$ python -m spacy download en_core_web_md
$ python -m spacy link en_core_web_md en
Upvotes: 1
Views: 2957
Reputation: 9532
There, you will find two answers at the time of writing:
spacy.cli.download("my_language_model_name")
, which should be the better way, see here.python3
, which works as well, see here.Both get rid of the error.
PS: I do this in Jupyter Notebook, and one thing I forgot is to restart the kernel:
Note: you may need to restart the kernel to use updated packages.
But I am also not sure whether this is needed since after restarting the kernel, the error stayed the same, and the error vanished only with the code change listed above. And much later, for another module, restarting the kernel was not needed even though the warning popped up.
Upvotes: 0
Reputation: 636
I would recommend installing SpaCy
separately, using pip
, as follows:
pip install -U pip setuptools wheel
pip install -U spacy
python -m spacy download en_core_web_md
Upvotes: 2