-1

我尝试使用 pip install mysql-python 安装 mysql-python

这是我得到的错误。

请调查一下

------------------------------------------------------------
/usr/local/bin/pip run on Sun Jul 28 14:31:33 2013
Downloading/unpacking Mysql-python

  Getting page https://pypi.python.org/simple/Mysql-python/
  URLs to search for versions for Mysql-python:
  * https://pypi.python.org/simple/Mysql-python/
  Analyzing links from page https://pypi.python.org/simple/MySQL-python/
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b2.tar.gz#md5=d13f7351e195277ffd019bd7644312c9 (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b2
    Skipping link https://pypi.python.org/packages/2.7/M/MySQL-python/MySQL-python-1.2.4c1.win32-py2.7.exe#md5=2a07d427814482fb90dbe97b591fc31d (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .exe
    Skipping link https://pypi.python.org/packages/2.5/M/MySQL-python/MySQL_python-1.2.2-py2.5-win32.egg#md5=596ec38e498e80ce73759f777b29c588 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3b1.tar.gz#md5=906c00cbfb81f54a474b3e7dcf7236bb (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.3b1
    Skipping link https://pypi.python.org/packages/2.7/M/MySQL-python/MySQL-python-1.2.4b1.win32-py2.7.exe#md5=e0a9f62c7a65eca79a1aa58371caa405 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .exe
    Skipping link https://pypi.python.org/packages/2.7/M/MySQL-python/MySQL-python-1.2.4b2.win32-py2.7.exe#md5=ac5812bf27dde82c41476b09aeba3ecf (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .exe
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b4.zip#md5=2ce6fad5c5fe4074c33e8e799dc7a0af (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b4
    Skipping link https://pypi.python.org/packages/2.5/M/MySQL-python/MySQL_python-1.2.3b1-py2.5-linux-i686.egg#md5=43ace300f3eda0fc418869b04a5139eb (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b4.tar.gz#md5=0958cb9c23d5a656caac031c4886b1cf (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b4
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b5.zip#md5=4f645ed23ea0f8848be77f25ffe94ade (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b5
    Skipping link https://pypi.python.org/packages/2.5/M/MySQL-python/MySQL_python-1.2.3b2-py2.5-linux-i686.egg#md5=36f78115685d8ed96ab9199c36ef0ab0 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/M/MySQL-python/MySQL_python-1.2.3c1-py2.5-linux-i686.egg#md5=1efcbed6f1f29acd50993f54109938d3 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.7/M/MySQL-python/MySQL-python-1.2.4b3.win32-py2.7.exe#md5=4596e73263008aa83d59b0541fe2ce7e (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .exe
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b3.tar.gz#md5=b495d89426d83ba1e305f774e81b872f (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b3
    Skipping link https://pypi.python.org/packages/2.6/M/MySQL-python/MySQL_python-1.2.3c1-py2.6-linux-i686.egg#md5=fd472a7c42ef80bd671272a25d6aadf8 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b3.zip#md5=2fb8db45f5c71dbc5869bd19eaaf546c (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b3
    Skipping link https://pypi.python.org/packages/2.7/M/MySQL-python/MySQL-python-1.2.4b5.win32-py2.7.exe#md5=ad3dd07e28fd38c89a02cacb122bf27a (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .exe
    Skipping link https://pypi.python.org/packages/2.7/M/MySQL-python/MySQL-python-1.2.4b4.win32-py2.7.exe#md5=b53ad22d5a8e16d11ffb919eb07c9b89 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .exe
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b5.tar.gz#md5=2d760ee948aff4f50d01afdf8afff48c (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b5
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3b2.tar.gz#md5=e30ae85d490e87f3788eb4a59e590130 (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.3b2
    Skipping link https://pypi.python.org/packages/2.6/M/MySQL-python/MySQL_python-1.2.3b1-py2.6-linux-i686.egg#md5=4a640ca00352a18e0a8211e935406100 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.6/M/MySQL-python/MySQL_python-1.2.3b2-py2.6-linux-i686.egg#md5=08ba3e38b899a70a1a2bb3239107acae (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3c1.tar.gz#md5=310dd856e439d070b59ece6dd7a0734d (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.3c1
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b1.tar.gz#md5=138669627e06f10c1c2e75122f673c21 (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4b1
    Skipping link https://pypi.python.org/packages/2.4/M/MySQL-python/MySQL_python-1.2.2-py2.4-win32.egg#md5=6620279666cb40e26d89079b55e61a3f (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4.zip#md5=ddf2386daf10a97af115ffad2ed4a9a0 (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4c1.zip#md5=a05925412cd824104da064db6a889613 (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.4c1
    Found link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz#md5=215eddb6d853f6f4be5b4afc4154292f (from https://pypi.python.org/simple/MySQL-python/), version: 1.2.3
    Skipping link https://pypi.python.org/packages/2.7/M/MySQL-python/MySQL-python-1.2.4.win32-py2.7.exe#md5=313b4ceed0144a3019f87a4fba5168d6 (from https://pypi.python.org/simple/MySQL-python/); unknown archive format: .exe
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b2.tar.gz#md5=d13f7351e195277ffd019bd7644312c9 (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b2 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3b1.tar.gz#md5=906c00cbfb81f54a474b3e7dcf7236bb (from https://pypi.python.org/simple/MySQL-python/), version 1.2.3b1 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b4.zip#md5=2ce6fad5c5fe4074c33e8e799dc7a0af (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b4 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b4.tar.gz#md5=0958cb9c23d5a656caac031c4886b1cf (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b4 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b5.zip#md5=4f645ed23ea0f8848be77f25ffe94ade (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b5 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b3.tar.gz#md5=b495d89426d83ba1e305f774e81b872f (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b3 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b3.zip#md5=2fb8db45f5c71dbc5869bd19eaaf546c (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b3 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b5.tar.gz#md5=2d760ee948aff4f50d01afdf8afff48c (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b5 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3b2.tar.gz#md5=e30ae85d490e87f3788eb4a59e590130 (from https://pypi.python.org/simple/MySQL-python/), version 1.2.3b2 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3c1.tar.gz#md5=310dd856e439d070b59ece6dd7a0734d (from https://pypi.python.org/simple/MySQL-python/), version 1.2.3c1 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4b1.tar.gz#md5=138669627e06f10c1c2e75122f673c21 (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4b1 is a pre-release (use --pre to allow).
  Ignoring link https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4c1.zip#md5=a05925412cd824104da064db6a889613 (from https://pypi.python.org/simple/MySQL-python/), version 1.2.4c1 is a pre-release (use --pre to allow).
  Using version 1.2.4 (newest of versions: 1.2.4, 1.2.3)
  Downloading from URL https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.4.zip#md5=ddf2386daf10a97af115ffad2ed4a9a0 (from https://pypi.python.org/simple/MySQL-python/)
  Running setup.py egg_info for package Mysql-python

    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz

    Extracting in /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/tmpLwHTSu

    Now working in /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/tmpLwHTSu/distribute-0.6.28

    Building a Distribute egg in /private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python

    /private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python/distribute-0.6.28-py2.6.egg

    running egg_info
    creating pip-egg-info/MySQL_python.egg-info
    writing pip-egg-info/MySQL_python.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/MySQL_python.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/MySQL_python.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/MySQL_python.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found
    reading manifest file 'pip-egg-info/MySQL_python.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/MySQL_python.egg-info/SOURCES.txt'
  Source in /private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python has version 1.2.4, which satisfies requirement Mysql-python
Installing collected packages: Mysql-python

  Running setup.py install for Mysql-python

    Running command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-eoRfEw-record/install-record.txt --single-version-externally-managed
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.6-universal-2.6
    copying _mysql_exceptions.py -> build/lib.macosx-10.6-universal-2.6
    creating build/lib.macosx-10.6-universal-2.6/MySQLdb
    copying MySQLdb/__init__.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
    copying MySQLdb/converters.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
    copying MySQLdb/connections.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
    copying MySQLdb/cursors.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
    copying MySQLdb/release.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
    copying MySQLdb/times.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb
    creating build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    copying MySQLdb/constants/CR.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    copying MySQLdb/constants/ER.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants
    running build_ext
    building '_mysql' extension

    creating build/temp.macosx-10.6-universal-2.6
    gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/opt/local/include/mysql5/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.6-universal-2.6/_mysql.o -Os -fPIC -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:803:1: warning: this is the location of the previous definition

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1206:1: warning: "SIZEOF_LONG" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:37:1: warning: this is the location of the previous definition

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1215:1: warning: "SIZEOF_PTHREAD_T" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:38:1: warning: this is the location of the previous definition

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1221:1: warning: "SIZEOF_TIME_T" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:40:1: warning: this is the location of the previous definition

    /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/as/ppc/as or /usr/bin/../local/libexec/as/ppc/as) for architecture ppc not installed

    Installed assemblers are:

    /usr/bin/../libexec/as/x86_64/as for architecture x86_64

    /usr/bin/../libexec/as/i386/as for architecture i386

    /usr/bin/../libexec/as/arm/as for architecture arm

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:803:1: warning: this is the location of the previous definition

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1206:1: warning: "SIZEOF_LONG" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:37:1: warning: this is the location of the previous definition

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1215:1: warning: "SIZEOF_PTHREAD_T" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:38:1: warning: this is the location of the previous definition

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1221:1: warning: "SIZEOF_TIME_T" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:40:1: warning: this is the location of the previous definition

    _mysql.c:3138: fatal error: error writing to -: Broken pipe

    compilation terminated.

    In file included from _mysql.c:44:

    /opt/local/include/mysql5/mysql/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined

    In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,

                     from _mysql.c:29:

    /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:803:1: warning: this is the location of the previous definition

    lipo: can't open input file: /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-//ccEYYs2B.out (No such file or directory)

    error: command 'gcc-4.2' failed with exit status 1

    Complete output from command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-eoRfEw-record/install-record.txt --single-version-externally-managed:

    running install

running build

running build_py

creating build

creating build/lib.macosx-10.6-universal-2.6

copying _mysql_exceptions.py -> build/lib.macosx-10.6-universal-2.6

creating build/lib.macosx-10.6-universal-2.6/MySQLdb

copying MySQLdb/__init__.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb

copying MySQLdb/converters.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb

copying MySQLdb/connections.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb

copying MySQLdb/cursors.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb

copying MySQLdb/release.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb

copying MySQLdb/times.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb

creating build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

copying MySQLdb/constants/CR.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

copying MySQLdb/constants/ER.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.6-universal-2.6/MySQLdb/constants

running build_ext

building '_mysql' extension

creating build/temp.macosx-10.6-universal-2.6

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/opt/local/include/mysql5/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.6-universal-2.6/_mysql.o -Os -fPIC -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:803:1: warning: this is the location of the previous definition

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1206:1: warning: "SIZEOF_LONG" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:37:1: warning: this is the location of the previous definition

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1215:1: warning: "SIZEOF_PTHREAD_T" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:38:1: warning: this is the location of the previous definition

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1221:1: warning: "SIZEOF_TIME_T" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:40:1: warning: this is the location of the previous definition

/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/as/ppc/as or /usr/bin/../local/libexec/as/ppc/as) for architecture ppc not installed

Installed assemblers are:

/usr/bin/../libexec/as/x86_64/as for architecture x86_64

/usr/bin/../libexec/as/i386/as for architecture i386

/usr/bin/../libexec/as/arm/as for architecture arm

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:803:1: warning: this is the location of the previous definition

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1206:1: warning: "SIZEOF_LONG" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:37:1: warning: this is the location of the previous definition

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1215:1: warning: "SIZEOF_PTHREAD_T" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:38:1: warning: this is the location of the previous definition

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1221:1: warning: "SIZEOF_TIME_T" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:9,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pymacconfig.h:40:1: warning: this is the location of the previous definition

_mysql.c:3138: fatal error: error writing to -: Broken pipe

compilation terminated.

In file included from _mysql.c:44:

/opt/local/include/mysql5/mysql/my_config.h:1088:1: warning: "HAVE_WCSCOLL" redefined

In file included from /System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:8,

                 from _mysql.c:29:

/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/pyconfig.h:803:1: warning: this is the location of the previous definition

lipo: can't open input file: /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-//ccEYYs2B.out (No such file or directory)

error: command 'gcc-4.2' failed with exit status 1

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

Cleaning up...

  Removing temporary dir /private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul...
Command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-eoRfEw-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python

Exception information:
Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/pip-1.4-py2.6.egg/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/Library/Python/2.6/site-packages/pip-1.4-py2.6.egg/pip/commands/install.py", line 241, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/Library/Python/2.6/site-packages/pip-1.4-py2.6.egg/pip/req.py", line 1277, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/Library/Python/2.6/site-packages/pip-1.4-py2.6.egg/pip/req.py", line 622, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Library/Python/2.6/site-packages/pip-1.4-py2.6.egg/pip/util.py", line 670, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-eoRfEw-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/nU/nUNh91JyEuC0Ne1rQzmgRE+++TI/-Tmp-/pip-build-geopaul/Mysql-python
4

1 回答 1

2

在编译_mysql.c时,您在编译失败堆栈跟踪中有一个损坏的管道错误。请参考 Github 上的这个链接,在那里安装PyLibMC时遇到了类似的问题。

解决方案是如下导出 ARCHFLAGS

export ARCHFLAGS='-arch i386 -arch x86_64'

让我们知道这是否有效。

于 2013-07-28T09:21:57.483 回答