Reputation: 325
In need of a python module that features a good POS tagger for the German language SpaCy was recommended to me.
On my Win10 64Bit with Python 3.4 I tried installing SpaCy as stated on its homepage, first preparing the virtualenv (installed partially, windows failed at source .env/bin/activate), then using pip install.
As this was not quite working, I cloned SpaCy from github via the git cmd and then continued in the windows console using virtualenv .env && source .env/bin/activate
which again failed at "source".
After that pip install -r requirements.txt
fails aswell.
I tried pip install -U spacy
then which seemed to work fine (no error messages) but further commands for using SpaCy (installing a model for example), using python -m spacy.en.download --force
all fail with Error while finding spec for 'spacy.en.download' (<class 'ImportError'>: No module named 'spacy.attrs')
.
What did I do wrong? How can I ensure a smooth install of SpaCy? It's at least in the list when I try pip list
.
Thank you all in advance!
Upvotes: 2
Views: 4118
Reputation: 716
Try remove it and install again:
pip uninstall spacy
pip install spacy
python -m spacy download en
Upvotes: 1
Reputation: 309
While trying to install spacy using conda, if you are getting PermissionError: [WinError 5] Access is denied
on windows 64, then you can directly type the below code in your virtual environment created in Anaconda prompt as described in the conda-forge docs:
conda install -c conda-forge spacy
Upvotes: 0
Reputation: 918
There are some incompatibilities between Anaconda and Spacy language download. Here is a pending pull request to fix the issue https://github.com/explosion/spaCy/pull/1792
Upvotes: 0
Reputation: 99
I also met some problems while installing spacy using pip. I have two tips for you:
pip uninstall spacy
and reinstall it again. conda install spacy
instead of pip
which works for me fine.Upvotes: 3
Reputation: 58
Check the default version of pip you are using. I had the same problem. My default pip version for installation was set to python3, so I tried
python3 -m spacy.en.download --force all
instead of
python -m spacy.en.download --force all
Upvotes: 1