Malte Ge
Malte Ge

Reputation: 325

SpaCy Install (extended) fails with pip install

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

Answers (5)

Chamod Dissanayake
Chamod Dissanayake

Reputation: 716

Try remove it and install again:

pip uninstall spacy

pip install spacy
python -m spacy download en

Upvotes: 1

Aakash Saxena
Aakash Saxena

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

Lcat
Lcat

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

Charles Ye
Charles Ye

Reputation: 99

I also met some problems while installing spacy using pip. I have two tips for you:

  1. Try to pip uninstall spacy and reinstall it again.
  2. using conda install spacy instead of pip which works for me fine.

Upvotes: 3

Purvanshi
Purvanshi

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

Related Questions