使用pip,easy_install或手动安装PyObjc出现问题。

3
我遇到了很多安装PyObjC的问题。我尝试使用pip、easy_install和手动安装,但都出现错误。目前我正在尝试使用easy_install,因为它是PyObjC网站推荐的方式。
运行时我使用以下命令:
sudo env CC=clang easy_install -U pyobjc-core

我收到以下警告信息:
warning: no directories found matching 'Scripts'
warning: no directories found matching 'setup-lib'
warning: no directories found matching 'source-deps'
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'

还有很多类似这样的错误:

/System/Library/Frameworks/CoreFoundation.framework/Headers/CFXMLNode.h:180:53: error: expected function body after function declarator
CFXMLNodeRef CFXMLTreeGetNode(CFXMLTreeRef xmlTree) CF_DEPRECATED(10_0, 10_8, 2_0, 6_0);

有人能帮我安装这个吗?


你使用的是哪个OSX版本? - Ronald Oussoren
你能用你正在使用的编译器编译简单的C程序吗?你得到的错误可能表明你的devtools安装已经损坏了。在编译pyobjc-core时,你遇到的第一个错误是什么?(顺便说一句,我是pyobjc的作者) - Ronald Oussoren
我也得到了大量的遮阳篷。 - Chet
2个回答

0

我尝试过

env CC=clang pip install -U pyobjc-core
env CC=clang pip install -U pyobjc

这对我有用。仍然有一些警告。例如每个包中的这些警告:

warning: no directories found matching 'Examples'
warning: no directories found matching 'Modules'
warning: no directories found matching 'source-deps'
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution

0
从您得到的错误来看,我想说您的编译器安装存在问题。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接