【问题标题】:Installation errors during installation of spaCy on Mac在 Mac 上安装 spaCy 时出现安装错误
【发布时间】:2018-03-12 15:19:34
【问题描述】:
enter code hereerror: command '/usr/bin/clang' failed with exit status 1

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

命令 "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c "import setuptools, tokenize;file='/private/var/folders/ hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-build-g2pxxnlc/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 /hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-wjdy1tf5-record/install-record.txt --single-version-externally-managed --compile" 失败,错误代码 1 在 /private/var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/ pip-build-g2pxxnlc/murmurhash/

enter code hereFailed building wheel for regex

为正则表达式运行 setup.py clean 无法构建正则表达式 安装收集的包:html5lib、pathlib、regex、msgpack-python、tqdm、toolz 找到现有安装:html5lib 0.999999999 卸载 html5lib-0.999999999: 成功卸载html5lib-0.999999999 找到现有安装:正则表达式 2017.11.9 卸载 regex-2017.11.9: 成功卸载regex-2017.11.9 为正则表达式运行 setup.py install ... 错误 命令的完整输出 /Users/venkateshpala/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-build -ltar9s28/regex/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/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip- edv9r7il-record/install-record.txt --single-version-externally-managed --compile: /Users/venkateshpala/anaconda3/lib/python3.6/site-packages/setuptools/dist.py:351:用户警告:将“2017.04.05”规范化为“2017.4.5” 标准化版本, 运行安装 运行构建 运行 build_py 创建构建 创建 build/lib.macosx-10.7-x86_64-3.6 复制 Python3/regex.py -> build/lib.macosx-10.7-x86_64-3.6 复制 Python3/_regex_core.py -> build/lib.macosx-10.7-x86_64-3.6 复制 Python3/test_regex.py -> build/lib.macosx-10.7-x86_64-3.6 运行 build_ext 构建“_regex”扩展 创建 build/temp.macosx-10.7-x86_64-3.6 创建 build/temp.macosx-10.7-x86_64-3.6/Python3 gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/venkateshpala/anaconda3/include -arch x86_64 -I/Users/venkateshpala/anaconda3 /include -arch x86_64 -I/Users/venkateshpala/anaconda3/include/python3.6m -c Python3/_regex.c -o build/temp.macosx-10.7-x86_64-3.6/Python3/_regex.o xcrun:错误:无效的活动开发者路径 (/Library/Developer/CommandLineTools),在:/Library/Developer/CommandLineTools/usr/bin/xcrun 缺少 xcrun 错误:命令“gcc”失败,退出状态为 1

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

回滚卸载正则表达式 命令 "/Users/venkateshpala/anaconda3/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-build-ltar9s28 /regex/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/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-edv9r7il- record/install-record.txt --single-version-externally-managed --compile" 失败,错误代码 1 在 /private/var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-build-ltar9s28/regex/

【问题讨论】:

    标签: spacy


    【解决方案1】:

    问题是我们(macOs 用户)无法安装一些库,除非安装了 Xcode 或 Xcode 的二进制文件是我在安装期间被要求的,之后我能够下载并运行spaCy 在我的机器上。

    【讨论】:

      【解决方案2】:

      在您的日志中:

      command 'gcc' failed with exit status 1
      

      安装gcc 可能会修复错误,或者安装另一个符号链接到gcc 的兼容编译器。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-08-27
        • 1970-01-01
        • 2021-09-13
        • 2016-11-05
        • 2018-02-04
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多