Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
283 views
in Technique[技术] by (71.8m points)

python - Failed building wheel for spacy

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:userssh00428701appdatalocalprogramspythonpython36python.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('
', '
');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:UsersSH0042~1AppDataLocalTempmpa6tzdkovpip-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:userssh00428701appdatalocalprogramspythonpython36python.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('
', '
');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:UsersSH0042~1AppDataLocalTempmpz7p6hkiwpip-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:userssh00428701appdatalocalprogramspythonpython36python.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('
', '
');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:UsersSH0042~1AppDataLocalTempmpwppgmyp9pip-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.0VCincl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:userssh00428701appdatalocalprogramspythonpython36include -IC:UsersSH0042~1AppDataLocalTemppip-build-joi6voavmurmurhashmurmurhashinclude -Ic:userssh00428701appdatalocalprogramspythonpython36include -Ic:userssh00428701appdatalocalprogramspythonpython36include /EHsc /Tpmurmurhash/mrmr.cpp /Fobuildemp.win-amd64-3.6Releasemurmurhash/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:userssh00428701appdatalocalprogramspythonpython36python.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('
', '
');f.close();exec(compile(code, __file__, 'exec'))" install --record C:UsersSH0042~1AppDataLocalTemppip-_j1cxej1-recordinstall-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:UsersSH0042~1AppDataLocalTemppip-build-joi6voavmurmurhash
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...