2017-06-12 48 views
1

我創建了virtualenv(pypy as compiler)。Spacy不能安裝在用pypy創建的virtualenv中

現在,當我嘗試使用pip安裝Spacy時,出現以下錯誤。

Failed to build spacy thinc 
Installing collected packages: thinc, ujson, certifi, chardet, idna, urllib3, requests, regex, webencodings, html5lib, wcwidth, ftfy, spacy 
    Running setup.py install for thinc ... error 
    Complete output from command /Users/azar-4893/Python_Venv/falconpypy/bin/pypy -u -c "import setuptools, tokenize;__file__='/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-Thl94z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/azar-4893/Python_Venv/falconpypy/include/site/python2.7/thinc: 
    running install 
    running build 
    running build_py 
    running build_ext 
    building 'thinc.linalg' extension 
    gcc -pthread -arch x86_64 -DNDEBUG -O2 -fPIC -I/Users/azar-4893/Python_Venv/falconpypy/include -I/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/include -I/Users/azar-4893/Python_Venv/falconpypy/include -c thinc/linalg.cpp -o build/temp.macosx-10.11-x86_64-2.7/thinc/linalg.o -O3 -Wno-strict-prototypes -Wno-unused-function 
    clang: error: no such file or directory: 'thinc/linalg.cpp' 
    clang: error: no input files 
    error: command 'gcc' failed with exit status 1 

    ---------------------------------------- 
Command "/Users/azar-4893/Python_Venv/falconpypy/bin/pypy -u -c "import setuptools, tokenize;__file__='/private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-Thl94z-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/azar-4893/Python_Venv/falconpypy/include/site/python2.7/thinc" failed with error code 1 in /private/var/folders/y1/npxxtb7n3k5d2mb7_5pwsr1xr6pvqq/T/pip-build-F0nppE/thinc/ 

是否有安裝spacy爲pypy的方法嗎?

回答

0

spacy使用一個名爲thinc的c-extensions模塊來完成它在C中的繁重工作。最新的PyPy無法安裝thinc,有多個問題阻止它的安裝。 Here是thinc中的一個,並且this尚未被支持,致電012tocytoolz