python - 安装spacy时出现错误

标签 python spacy

使用 pip 安装 spacy 时出现错误(在 mac python3 下)。以下是错误报告的最后部分。看来错误还不少。我该如何修复它?我已经安装了gcc。

gcc: warning: x86_64 conflicts with i386 (arch flags ignored)
  cc1plus: warning: command line option '-Wno-strict-prototypes' is valid for C/ObjC but not for C++
  g++-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g build/temp.macosx-10.6-intel-3.6/thinc/linalg.o -o build/lib.macosx-10.6-intel-3.6/thinc/linalg.cpython-36m-darwin.so
  unable to execute 'g++-4.2': No such file or directory
  error: command 'g++-4.2' failed with exit status 1

......

/usr/local/bin/gcc -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -I/private/var/folders/md/8kgtqqz12j94hbcvhqz0w7gw0000gp/T/pip-build-sm84mnwa/murmurhash/murmurhash/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c murmurhash/mrmr.cpp -o build/temp.macosx-10.6-intel-3.6/murmurhash/mrmr.o -O3 -Wno-strict-prototypes -Wno-unused-function
gcc: warning: x86_64 conflicts with i386 (arch flags ignored)
gcc: error: murmurhash/mrmr.cpp: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command '/usr/local/bin/gcc' failed with exit status 1

----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/md/8kgtqqz12j94hbcvhqz0w7gw0000gp/T/pip-build-sm84mnwa/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 /var/folders/md/8kgtqqz12j94hbcvhqz0w7gw0000gp/T/pip-4_7dl2wl-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/md/8kgtqqz12j94hbcvhqz0w7gw0000gp/T/pip-build-sm84mnwa/murmurhash/

最佳答案

我真的不确定这是否相关,但我今天早上看到一个讨论,说最新的 macOS 升级 (Catalina) 完全放弃了对 32 位应用程序的支持。我之所以提到它是因为 x86_64 与 i386 冲突可能引用了 32 位/64 位问题。

您最近升级过 Mac 操作系统吗?如果是这样,也许您需要将依赖项升级到 64 位等效项?

关于python - 安装spacy时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45891739/

相关文章:

python - 为什么这不创建文件?

python - Comet 协议(protocol)和 Django - 我知道一些选项,但我似乎无法使它们工作

python - Spacy:新词取代现有实体

python - spacy tokenizer 无法一致地将句号识别为后缀

python - matplotlib如何用定义的颜色绘制多条线?

python - sqlalchemy .contains() 仅匹配第一个元素

python - 如何解释在 Python 中使用 Spacy 构建的句子解析树的结果?

python - 用前面提到的人替换人称代词(嘈杂的 coref)

python - 得到参数 'other' 的类型不正确(预期 spacy.tokens.token.Token,得到 str)

Python Numba Cuda Copy_To_Host 慢