This Solution worked for me:
- Go to start and right Click on the Anaconda Promt icon
- Select "Open as Administrator"
- Type
python -m spacy download en
It should install the package and also link it. Just typing python -m spacy download en didnt work for me since it failed to link the package for some obscure reason
This Solution worked for me:
- Go to start and right Click on the Anaconda Promt icon
- Select "Open as Administrator"
- Type
python -m spacy download en
It should install the package and also link it. Just typing python -m spacy download en didnt work for me since it failed to link the package for some obscure reason
Videos
This Solution worked for me:
- Go to start and right Click on the Anaconda Promt icon
- Select "Open as Administrator"
- Type
python -m spacy download en
It should install the package and also link it. Just typing python -m spacy download en didnt work for me since it failed to link the package for some obscure reason
installing spacy package through conda prompt doesn't automatically download lexicons. You have to specifically download the lexicons using the following command:
conda$python -m spacy download en
And from your python code you should reference it as below:
import spacy
nlp = spacy.load('en')
Another alternative is you can download more specific models as below:
# most relevant model for your spacy installation
python -m spacy download en_core_web_sm
# exact model version (doesn't create shortcut link)
python -m spacy download en_core_web_sm-2.0.0 --direct
And in your python code, you would do like below:
import en_core_web_sm
nlp = en_core_web_sm.load()
» pip install spacy
Instead of creating virtual environment like this. There is an option to create virtual environments in Anaconda with required Python version.
conda create -n myenv python=3.8
To activate it :
source activate myenv # (in linux, you can use . as a shortcut for "source")
activate myenv # (in windows - note that you should be in your c:\anaconda2 directory)
Try running these commands into the terminal instead of the Jupyter Notebook cells directly. If you still want to do it that way, make it right by adding a ! in the beginning.
!python -m venv .env
!source .env/bin/activate
!conda install -c conda-forge spacy
!python -m spacy download en_core_web_sm