Python Cannot install module spaCy

It took me a while to get spaCy installed correctly, I am on Windows and running python 3.6.4. I'll share my installation process in case it helps anyone.

I am using pycharm as my IDE and working from the venv it creates.

I also had similar problems to the OP and managed to get it working outside the venv.

The main issue appeared to be with pip.

First of all, I deleted my pip cache as it appeared to be causing troubles (atleast on my machine). On windows it is located on:

C:\Users\YOUR_USERNAME\AppData\Local\pip\cache

Just delete the folder.

Then I had to upadte pip to the latest version for the installation to work,

python -m pip install --upgrade pip

Check your pip version (at the time of this comment the latest version is 10.0.1)

python -m pip --version

After this process I managed to get it working by installing it with pip

python -m pip install spacy

You might be using the python 32-bit version which you need to uninstall and you will need to switch to the python 64-bit version.

After switching everything will work fine, just upgrade pip and setuptools before installing.


Ok, here is a working solution (at least on windows 10 & python3.7):

Go here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#spacy

Search SpaCy and download the correct wheels for your platform :-

  • preshed
  • cymem
  • murmurhash
  • thinc
  • spacy

Then you need to install them with pip install [wheel] in the above order.

If this doesn't work, try installing scipy and maybe even numpy from the same site.


The following two commans should be enough:

pip install -U spacy

python -m spacy download en

Note that on Windows you should execute the commands with 'Run as Administrator' privileges.