1
votes

I'm trying to download SpaCy using pip and it isn't working on my computer. I'm getting the following error message:

Command "c:\users\myname\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;file='C:\Users\MyName\AppData\Local\Temp\pip-install-6g5hk79j\cytoolz\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\MyName\AppData\Local\Temp\pip-record-makf5_wt\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\MyName\AppData\Local\Temp\pip-install-6g5hk79j\cytoolz\

I've tried everything I've found from other posts on this problem, and nothing is working. Please help!

2
It said failed building wheel for cytoolz earlier. - John Doe
Please show that early error. - phd
I'd recommend you to use a venv or an IDE like PyCharm. Otherwise, using pip in windows will be a nightmare. - 0x5050

2 Answers

1
votes

I would suggest you to use Anaconda and install it using conda install spacy, because there seems to be a problem with the compiler that you have.

Also, You can very well use Pycharm.

0
votes

This error likely happens because there's an issue with your compiler, or because your machine doesn't have a compiler installed.

While spaCy v2.0.x itself provides pre-compiled wheels, some external dependencies don't and need to be compiled locally. The easiest solution for this is to install from conda instead, which should give you pre-compiled Windows wheels for everything. Alternatively, you can also install the Visual C++ build tools (not to be confused with Visual Studio).

spaCy v2.1, which was just released, replaced several third-party dependencies to allow shipping pre-built wheels for everything. So if you try again now, you should be able to install the library and all its dependencies without needing to compile anything locally.