我创建了virtualenv(pypy as compiler)。
现在,当我尝试使用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/
有没有办法为pypy安装spacy?
答案 0 :(得分:1)
在MacOS上,请尝试执行此操作
CFLAGS='-stdlib=libc++' pip install spacy==2.0.12 thinc==6.10.3 google-compute-engine https://github.com/huggingface/neuralcoref-models/releases/download/en_coref_md-3.0.0/en_coref_md-3.0.0.tar.gz
答案 1 :(得分:0)