Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed building wheel for spacy

Tags:

I'm trying to install spacy by running pip install spacy for python version 3.6.1 but continuously i'm getting errors like below,how to get rid of this issue? previously i was having cl.exe not found error, after that i added visual studio path in environment variables where cl.exe exists.

     Failed building wheel for spacy   Running setup.py clean for spacy   Running setup.py bdist_wheel for murmurhash ... error   Complete output from command c:\users\sh00428701\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SH0042~1\\AppData\\Local\\Temp\\pip-build-joi6voav\\murmurhash\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\SH0042~1\AppData\Local\Temp\tmpa6tzdkovpip-wheel- --python-tag cp36:   running bdist_wheel   running build   running build_py ----------------------------------------   Failed building wheel for murmurhash   Running setup.py clean for murmurhash   Running setup.py bdist_wheel for cymem ... error   Complete output from command c:\users\sh00428701\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SH0042~1\\AppData\\Local\\Temp\\pip-build-joi6voav\\cymem\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\SH0042~1\AppData\Local\Temp\tmpz7p6hkiwpip-wheel- --python-tag cp36:   ----------------------------------------   Failed building wheel for cymem   Running setup.py clean for cymem   Running setup.py bdist_wheel for preshed ... error   Complete output from command c:\users\sh00428701\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SH0042~1\\AppData\\Local\\Temp\\pip-build-joi6voav\\preshed\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\SH0042~1\AppData\Local\Temp\tmpwppgmyp9pip-wheel- --python-tag cp36:    ----------------------------------------   Failed building wheel for preshed   Running setup.py clean for preshed   Running setup.py bdist_wheel for thinc ... error  ----------------------------------------   Failed building wheel for thinc   Running setup.py clean for thinc   Running setup.py bdist_wheel for ujson ... error   ----------------------------------------   Failed building wheel for ujson   Running setup.py clean for ujson   Running setup.py bdist_wheel for cytoolz ... error   ----------------------------------------   Failed building wheel for cytoolz   Running setup.py clean for cytoolz Failed to build spacy murmurhash cymem preshed thinc ujson cytoolz Installing collected packages: murmurhash, cymem, preshed, wrapt, tqdm, toolz, cytoolz, plac, pyreadline, dill, termcolor, pathlib, thinc, ujson, regex, spacy   Running setup.py install for murmurhash ... error     C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\sh00428701\appdata\local\programs\python\python36\include -IC:\Users\SH0042~1\AppData\Local\Temp\pip-build-joi6voav\murmurhash\murmurhash\include -Ic:\users\sh00428701\appdata\local\programs\python\python36\include -Ic:\users\sh00428701\appdata\local\programs\python\python36\include /EHsc /Tpmurmurhash/mrmr.cpp /Fobuild\temp.win-amd64-3.6\Release\murmurhash/mrmr.obj /Ox /EHsc     mrmr.cpp     c1xx: fatal error C1083: Cannot open source file: 'murmurhash/mrmr.cpp': No such file or directory     error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\cl.exe' failed with exit status 2      ---------------------------------------- Command "c:\users\sh00428701\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\SH0042~1\\AppData\\Local\\Temp\\pip-build-joi6voav\\murmurhash\\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\SH0042~1\AppData\Local\Temp\pip-_j1cxej1-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\SH0042~1\AppData\Local\Temp\pip-build-joi6voav\murmurhash\ 
like image 500
Sachin Prasad Avatar asked Apr 12 '17 13:04

Sachin Prasad


People also ask

Why spacy is not installing?

This error means that the spaCy module can't be located on your system, or in your environment. Make sure you have spaCy installed. If you're using a virtual environment, make sure it's activated and check that spaCy is installed in that environment – otherwise, you're trying to load a system installation.

Could not build wheels for PY find 1st which use PEP 517 and Cannot be installed directly?

To Solve ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly Error Just update your pip and your error will be solve. pip3 install –upgrade pip. this error solved just after update pip with setuptools wheel just run below command. pip install –upgrade pip setuptools wheel.


2 Answers

for me, pip install --no-cache-dir spacy worked

like image 109
naoko Avatar answered Sep 22 '22 23:09

naoko


A couple thoughts:

  • Grab the various wheel files you need from http://www.lfd.uci.edu/~gohlke/pythonlibs/#spacy and install with pip install x.whl y.whl etc.
  • Upgrade your version of cpp build tools to 2017 and try pip again
like image 20
David C Avatar answered Sep 18 '22 23:09

David C