Python 安装失败

Python 安装失败

我正在尝试在 iMac (OS-X 10.8.2) 上安装 Gentoo Prefix。在安装过程中,Python 2.7.3 安装失败。以下是回溯:

...
/usr/bin/ranlib: file: libpython2.7.a(pymath.o) has no symbols
ranlib libpython2.7.a
ranlib: file: libpython2.7.a(pymath.o) has no symbols
gcc -L/Users/me/Gentoo/tmp/usr/lib  -o python.exe \
            Modules/python.o \
            libpython2.7.a -ldl  -framework CoreFoundation     
Traceback (most recent call last):
  File "./setup.py", line 15, in <module>
    from distutils.command.build_ext import build_ext
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/command/build_ext.py", line 37, in <module>
    class build_ext (Command):
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/command/build_ext.py", line 67, in build_ext
    "(default: %s)" % get_platform()),
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/util.py", line 103, in get_platform
    cfgvars = get_config_vars()
  File "/Users/me/Gentoo/tmp/var/tmp/python-2.7.3/Python-2.7.3/Lib/distutils/sysconfig.py", line 568, in get_config_vars
    flags = _config_vars[key]
KeyError: 'CXXFLAGS'
make: *** [sharedmods] Error 1

我只能推断,也许错误,CXXFLAGS在字典中没有出现_config_vars预期的那个。但为什么呢?有人知道吗?我想这是前缀特有的,但也许不是。

相关内容