Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Cannot install module spaCy

I´m new to python and I ran into a problem I can´t solve. I would like to install and use the package spacy in python. Therefore I opened cmd and ran

pip install spacy

While installing the dependecies I get an error message:

    ----------------------------------------

Command ""c:\users\xxx\appdata\local\programs\python\python37\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\xxx\AppData\Local\Temp\pip-install-6vcdnb_4\numpy\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\xxx\AppData\Local\Temp\pip-record-jhmti8_8\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\xxx\AppData\Local\Temp\pip-install-6vcdnb_4\numpy\

but I have no idea what´s the problem...

Does anybody has a solution for this?

I use Windows and python version 3.7.0b4

like image 553
WinterMensch Avatar asked May 23 '18 08:05

WinterMensch


People also ask

What is spaCy module in Python?

spaCy is a free, open-source library for NLP in Python. It's written in Cython and is designed to build information extraction or natural language understanding systems. It's built for production use and provides a concise and user-friendly API.

How do I install a spaCy model in Pycharm?

Click the Python Interpreter tab within your project tab. Click the small + symbol to add a new library to the project. Now type in the library to be installed, in your example "spacy" without quotes, and click Install Package . Wait for the installation to terminate and close all popup windows.


1 Answers

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.

like image 81
MegaIng Avatar answered Sep 23 '22 08:09

MegaIng