Python 在OSX lion上安装pyobjc模块时出现问题?(10.7.5)xcode(4.6.3)

Python 在OSX lion上安装pyobjc模块时出现问题?(10.7.5)xcode(4.6.3),python,xcode,osx-lion,pyobjc,Python,Xcode,Osx Lion,Pyobjc,我目前正在尝试在Lion OSX 10.7.5和Xcode 4.6.3上安装Python2.7中的“pyobjc”模块。我最终想要安装的模块是Quartz。我尝试过各种安装方法,包括easy\u install、pip install、以及python setup.py install,所有这些方法都会导致类似的错误消息,如下所示: 1) 易于安装 $ easy_install -U pyobjc Searching for pyobjc Reading https://pypi.python.

我目前正在尝试在Lion OSX 10.7.5和Xcode 4.6.3上安装Python2.7中的“pyobjc”模块。我最终想要安装的模块是Quartz。我尝试过各种安装方法,包括
easy\u install
pip install
、以及
python setup.py install
,所有这些方法都会导致类似的错误消息,如下所示:

1)
易于安装

$ easy_install -U pyobjc
Searching for pyobjc
Reading https://pypi.python.org/simple/pyobjc/
Best match: pyobjc 3.0.4
Processing pyobjc-3.0.4-py2.7.egg
pyobjc 3.0.4 is already the active version in easy-install.pth

Using /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyobjc-3.0.4-py2.7.egg
Processing dependencies for pyobjc
Searching for pyobjc-framework-StoreKit==3.0.4
Reading https://pypi.python.org/simple/pyobjc-framework-StoreKit/
Best match: pyobjc-framework-StoreKit 3.0.4
Downloading https://pypi.python.org/packages/source/p/pyobjc-framework-StoreKit/pyobjc-framework-StoreKit-3.0.4.tar.gz#md5=734893300a3aa40153b8fce93e006812
Processing pyobjc-framework-StoreKit-3.0.4.tar.gz
Writing /var/folders/1s/520_dbbj7r9fhx093c93_jf80000gn/T/easy_install-u2q6Sz/pyobjc-framework-StoreKit-3.0.4/setup.cfg
Running pyobjc-framework-StoreKit-3.0.4/setup.py -q bdist_egg --dist-dir /var/folders/1s/520_dbbj7r9fhx093c93_jf80000gn/T/easy_install-u2q6Sz/pyobjc-framework-StoreKit-3.0.4/egg-dist-tmp-7fnscr
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 '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.dSYM/*' found anywhere in distribution
warning: no previously-included files matching '*.dSYM' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
Modules/objc/objc-runtime-compat.m:885:17: error: cannot find interface
      declaration for 'Object'; did you mean 'NSObject'?
@implementation Object (NSObjectCompat)
                ^~~~~~
                NSObject
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:12: note: 
      'NSObject' declared here
@interface NSObject <NSObject> {
           ^
Modules/objc/objc-runtime-compat.m:891:1: warning: method has no return type
      specified; defaults to 'id' [-Wmissing-method-return-type]
-doesNotRecognizeSelector:(SEL)sel
^
 (id)
Modules/objc/objc-runtime-compat.m:886:1: warning: category is implementing a
      method which will also be implemented by its primary class
      [-Wobjc-protocol-method-implementation]
- (id)self
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:20:1: note: 
      method 'self' declared here
- (id)self;
^
2 warnings and 1 error generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
3) 导航到quartz目录后

$ python setup.py install

newusers-MacBook:pyobjc-framework-quartz-3.0.4 newuser$ python setup.py install
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 '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.dSYM/*' found anywhere in distribution
warning: no previously-included files matching '*.dSYM' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
Modules/objc/objc-runtime-compat.m:885:17: error: cannot find interface
      declaration for 'Object'; did you mean 'NSObject'?
@implementation Object (NSObjectCompat)
                ^~~~~~
                NSObject
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:12: note: 
      'NSObject' declared here
@interface NSObject <NSObject> {
           ^
Modules/objc/objc-runtime-compat.m:891:1: warning: method has no return type
      specified; defaults to 'id' [-Wmissing-method-return-type]
-doesNotRecognizeSelector:(SEL)sel
^
 (id)
Modules/objc/objc-runtime-compat.m:886:1: warning: category is implementing a
      method which will also be implemented by its primary class
      [-Wobjc-protocol-method-implementation]
- (id)self
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:20:1: note: 
      method 'self' declared here
- (id)self;
^
2 warnings and 1 error generated.
Traceback (most recent call last):
  File "setup.py", line 81, in <module>
    [ 'Modules/_coregraphics.m' ], extra_link_args=["-framework", "ApplicationServices"]),
  File "/Users/newuser/Downloads/pyobjc-framework-Quartz-3.0.4/pyobjc_setup.py", line 460, in setup
    **k
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 268, in __init__
  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 313, in fetch_build_eggs
  File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 836, in resolve
  File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 1081, in best_match
  File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 1093, in obtain
  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 380, in fetch_build_egg
  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 629, in easy_install

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 659, in install_item

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 842, in install_eggs

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1070, in build_and_install

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1058, in run_setup

distutils.errors.DistutilsError: Setup script exited with error: command 'clang' failed with exit status 1
newusers-MacBook:pyobjc-framework-quartz-3.0.4 newuser$ 
$python setup.py安装
新用户MacBook:pyobjc-framework-quartz-3.0.4新用户$python setup.py安装
警告:未找到与“脚本”匹配的目录
警告:找不到与“安装库”匹配的目录
警告:找不到与“源deps”匹配的目录
警告:在分发版的任何位置都找不到以前包含的与“.DS\u Store”匹配的文件
警告:在发行版中找不到以前包含的与“*.pyc”匹配的文件
警告:在发行版中找不到以前包含的与“*.pyo”匹配的文件
警告:在发行版中找不到以前包含的与“*.so”匹配的文件
警告:在发行版中找不到以前包含的与“*.dSYM/*”匹配的文件
警告:在发行版中找不到以前包含的与“*.dSYM”匹配的文件
警告:在发行版中找不到以前包含的与“\uuuu pycache\uuuuu”匹配的文件
Modules/objc/objc runtime compat.m:885:17:错误:找不到接口
“目标”的声明;你是说“NSObject”吗?
@实现对象(NSObjectCompat)
^~~~~~
NSObject
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:12:注意:
此处声明的“NSObject”
@接口对象{
^
Modules/objc/objc runtime compat.m:891:1:警告:方法没有返回类型
指定;默认为“id”[-Wmissing方法返回类型]
-不认识选择器:(SEL)SEL
^
(id)
Modules/objc/objc runtime compat.m:886:1:警告:类别正在实现
方法,该方法也将由其主类实现
[-Wobjc协议方法实现]
-(id)自我
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:20:1:注意:
方法“self”在此处声明
-(id)自我保护;
^
生成2个警告和1个错误。
回溯(最近一次呼叫最后一次):
文件“setup.py”,第81行,在
['Modules/_coregraphics.m'],额外的链接参数=[“-framework”,“ApplicationServices”],
文件“/Users/newuser/Downloads/pyobjc-framework-Quartz-3.0.4/pyobjc_setup.py”,第460行,在setup中
**k
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py”,第111行,在安装程序中
_设置\u分布=dist=klass(属性)
文件“build/bdist.macosx-10.6-intel/egg/setuptools/dist.py”,第268行,在__
文件“build/bdist.macosx-10.6-intel/egg/setuptools/dist.py”,第313行,在fetch\u build\u eggs中
文件“build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py”,第836行,解析
文件“build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py”,第1081行,最佳匹配
文件“build/bdist.macosx-10.6-intel/egg/pkg_resources/___init__.py”,第1093行,获取
文件“build/bdist.macosx-10.6-intel/egg/setuptools/dist.py”,第380行,在fetch\u build\u egg中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第629行,在easy_install中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第659行,在安装项中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第842行,在install_egs中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第1070行,在build_和_install中
文件“build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py”,第1058行,在run_安装程序中
distutils.errors.DistutilsError:安装程序脚本退出,出现错误:命令“clang”失败,退出状态为1
新用户MacBook:pyobjc-framework-quartz-3.0.4新用户$
$ python setup.py install

newusers-MacBook:pyobjc-framework-quartz-3.0.4 newuser$ python setup.py install
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 '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching '*.dSYM/*' found anywhere in distribution
warning: no previously-included files matching '*.dSYM' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
Modules/objc/objc-runtime-compat.m:885:17: error: cannot find interface
      declaration for 'Object'; did you mean 'NSObject'?
@implementation Object (NSObjectCompat)
                ^~~~~~
                NSObject
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:76:12: note: 
      'NSObject' declared here
@interface NSObject <NSObject> {
           ^
Modules/objc/objc-runtime-compat.m:891:1: warning: method has no return type
      specified; defaults to 'id' [-Wmissing-method-return-type]
-doesNotRecognizeSelector:(SEL)sel
^
 (id)
Modules/objc/objc-runtime-compat.m:886:1: warning: category is implementing a
      method which will also be implemented by its primary class
      [-Wobjc-protocol-method-implementation]
- (id)self
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:20:1: note: 
      method 'self' declared here
- (id)self;
^
2 warnings and 1 error generated.
Traceback (most recent call last):
  File "setup.py", line 81, in <module>
    [ 'Modules/_coregraphics.m' ], extra_link_args=["-framework", "ApplicationServices"]),
  File "/Users/newuser/Downloads/pyobjc-framework-Quartz-3.0.4/pyobjc_setup.py", line 460, in setup
    **k
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 268, in __init__
  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 313, in fetch_build_eggs
  File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 836, in resolve
  File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 1081, in best_match
  File "build/bdist.macosx-10.6-intel/egg/pkg_resources/__init__.py", line 1093, in obtain
  File "build/bdist.macosx-10.6-intel/egg/setuptools/dist.py", line 380, in fetch_build_egg
  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 629, in easy_install

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 659, in install_item

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 842, in install_eggs

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1070, in build_and_install

  File "build/bdist.macosx-10.6-intel/egg/setuptools/command/easy_install.py", line 1058, in run_setup

distutils.errors.DistutilsError: Setup script exited with error: command 'clang' failed with exit status 1
newusers-MacBook:pyobjc-framework-quartz-3.0.4 newuser$