osx python setup.py不会安装xattr-0.6.1应用程序

osx python setup.py不会安装xattr-0.6.1应用程序,python,macos,svn,installation,Python,Macos,Svn,Installation,我不熟悉svn和python,但我真的希望使用比操作系统附带的原始版本更新的xattr版本,它包含更多有用的功能 在OSX 10.5.6上,我在安装xattr-0.6.1时遇到问题 从终端中的本地计算机: $ svn co http://svn.red-bean.com/bob/xattr/releases/xattr-0.6.1/ 这些文件被下载并放置在~/xattr-0.6.1中/ $ cd xattr-0.6.1/ $ sudo python setup.py install ----

我不熟悉svn和python,但我真的希望使用比操作系统附带的原始版本更新的xattr版本,它包含更多有用的功能

在OSX 10.5.6上,我在安装xattr-0.6.1时遇到问题

从终端中的本地计算机:

$ svn co http://svn.red-bean.com/bob/xattr/releases/xattr-0.6.1/
这些文件被下载并放置在~/xattr-0.6.1中/

$ cd xattr-0.6.1/
$ sudo python setup.py install

---------------------------------------------------------------------------
This script requires setuptools version 0.6c11 to run (even to display
help).  I will attempt to download it for you (from
http://pypi.python.org/packages/2.5/s/setuptools/), but
you may need to enable firewall access for this script first.
I will start the download in 15 seconds.

(Note: if this machine does not have network access, please obtain the file

   http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg

and place it in this directory before rerunning this script.)
---------------------------------------------------------------------------
Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg
running install
running bdist_egg
running egg_info
creating xattr.egg-info
writing xattr.egg-info/PKG-INFO
writing top-level names to xattr.egg-info/top_level.txt
writing dependency_links to xattr.egg-info/dependency_links.txt
writing entry points to xattr.egg-info/entry_points.txt
writing manifest file 'xattr.egg-info/SOURCES.txt'
writing manifest file 'xattr.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.5-i386/egg
running install_lib
running build_py
creating build
creating build/lib.macosx-10.5-i386-2.5
creating build/lib.macosx-10.5-i386-2.5/xattr
copying xattr/__init__.py -> build/lib.macosx-10.5-i386-2.5/xattr
copying xattr/constants.py -> build/lib.macosx-10.5-i386-2.5/xattr
copying xattr/tool.py -> build/lib.macosx-10.5-i386-2.5/xattr
running build_ext
building 'xattr._xattr' extension
creating build/temp.macosx-10.5-i386-2.5
creating build/temp.macosx-10.5-i386-2.5/xattr
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c xattr/_xattr.c -o build/temp.macosx-10.5-i386-2.5/xattr/_xattr.o
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
要检查python的版本,请执行以下操作:

$ python -V
Python 2.5.1
它似乎已经安装了python更新

我尝试再次运行xattr安装:

$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing xattr.egg-info/PKG-INFO
writing top-level names to xattr.egg-info/top_level.txt
writing dependency_links to xattr.egg-info/dependency_links.txt
writing entry points to xattr.egg-info/entry_points.txt
writing manifest file 'xattr.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.5-i386/egg
running install_lib
running build_py
running build_ext
building 'xattr._xattr' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c xattr/_xattr.c -o build/temp.macosx-10.5-i386-2.5/xattr/_xattr.o
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1

我是否缺少一个重要的基本元素,或者setup.py配置有什么问题,或者我可能忽略了什么?

它需要编译一个C文件,所以它需要
gcc
。Mac用户需要安装更新正如@jathanism提到的,你应该有一张随Mac电脑附带的XCode安装DVD(很可能是3.2版)

例如:

atlas% which gcc
/usr/bin/gcc
atlas% gcc -v
Target: i686-apple-darwin10
..
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)

这个链接是到XCode 4的,你必须购买它。适合您的系统版本的XCode版本捆绑在“可选安装”目录下的安装DVD上。非常感谢您的sirs@samplebias,@jathanism。原来我的10.5紧身衣升级磁盘有Xcode 3.0,其中包括GCC4.0。安装Xcode后,我能够运行setup.py,现在安装了更新版本的xattr.:)很高兴听到你开始跑步了!