在Mac上安装spaCy时出现安装错误

时间:2018-03-12 15:19:35

标签: spacy

enter code hereerror: command '/usr/bin/clang' failed with exit status 1

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

Command" /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 -u -c" import setuptools,tokenize; file =&# 39; /private/var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-build-g2pxxnlc/murmurhash/setup.py' ;; f = getattr(tokenize,' open&#39 ;, open)( file ); code = f.read()。replace(' \ r \ n',' \ n'); f.close(); exec(编译(代码,文件,' exec'))" install --record /var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-wjdy1tf5-record/install-record.txt --single-version-external-managed --compile"在/ private / var / folders / hl / zm3tpkmd4ws1b21nk792wdj80000gn / T / pip-build-g2pxxnlc / murmurhash /

中出现错误代码1失败
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 for regex ...错误     从命令/ Users / venkateshpala / anaconda3 / bin / python -u -c&#34完成输出;导入setuptools,tokenize; 文件 =' / 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(编译(代码,文件, ' EXEC'))" install --record /var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-edv9r7il-record/install-record.txt --single-version-external-managed --compile:     /Users/venkateshpala/anaconda3/lib/python3.6/site-packages/setuptools/dist.py:351:UserWarning:Normalizing' 2017.04.05'到2017.4.5'       normalized_version,     运行安装     运行构建     运行build_py     创建构建     创建build / lib.macosx-10.7-x86_64-3.6     复制Python3 / regex.py - >建立/ lib.macosx-10.7-x86_64-3.6     复制Python3 / _regex_core.py - >建立/ lib.macosx-10.7-x86_64-3.6     复制Python3 / test_regex.py - >建立/ 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),缺少xcrun:/ Library / Developer / CommandLineTools / usr / bin / xcrun     错误:命令' gcc'退出状态1失败

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

回滚卸载正则表达式 命令" / Users / venkateshpala / anaconda3 / bin / python -u -c"导入setuptools,tokenize; 文件 =' / private / var / folders / hl / zm3tpkmd4ws1b21nk792wdj80000gn / T / pip-build-ltar9s28 / regex / setup.py&#39 ;; f = getattr(tokenize,' open&#39 ;, open)( file ); code = f .read()。replace(' \ r \ n',' \ n'); f.close(); exec(编译(代码,文件) ,' exec'))" install --record /var/folders/hl/zm3tpkmd4ws1b21nk792wdj80000gn/T/pip-edv9r7il-record/install-record.txt --single-version-external-managed --compile"在/ private / var / folders / hl / zm3tpkmd4ws1b21nk792wdj80000gn / T / pip-build-ltar9s28 / regex /

中失败,错误代码为1

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

在您的日志中:

command 'gcc' failed with exit status 1

安装gcc可能会修复错误,或其他兼容的编译器符号链接到gcc