mac安装mysql出错_尝试在Mac OS X Yosemi上安装MySQLpython时出错

我收到一个错误clang:error:未知参数:'-fabi version=2'

当我尝试用pip安装mysql python时。在MacBook-Pro-de-Haruan:MySQL-python-1.2.5 haruan$ sudo -E pip install MySQL-python

The directory '/Users/haruan/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

The directory '/Users/haruan/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting MySQL-python

Downloading MySQL-python-1.2.5.zip (108kB)

100% |████████████████████████████████| 110kB 311kB/s

Installing collected packages: MySQL-python

Running setup.py install for MySQL-python

Complete output from command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/sh/gl953xl12p3fl1k0lkw10_k00000gn/T/pip-build-ZBmISy/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/sh/gl953xl12p3fl1k0lkw10_k00000gn/T/pip-5RkJ0a-record/install-record.txt --single-version-externally-managed --compile:

running install

running build

running build_py

creating build

creating build/lib.macosx-10.10-x86_64-2.7

copying _mysql_exceptions.py -> build/lib.macosx-10.10-x86_64-2.7

creating build/lib.macosx-10.10-x86_64-2.7/MySQLdb

copying MySQLdb/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb

copying MySQLdb/converters.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb

copying MySQLdb/connections.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb

copying MySQLdb/cursors.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb

copying MySQLdb/release.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb

copying MySQLdb/times.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb

creating build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/CR.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/ER.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.10-x86_64-2.7/MySQLdb/constants

running build_ext

building '_mysql' extension

creating build/temp.macosx-10.10-x86_64-2.7

clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/Applications/XAMPP/xamppfiles/include -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.10-x86_64-2.7/_mysql.o -arch x86_64 -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing

clang: error: unknown argument: '-fabi-version=2'

error: command 'clang' failed with exit status 1

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

Command "/usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/sh/gl953xl12p3fl1k0lkw10_k00000gn/T/pip-build-ZBmISy/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/sh/gl953xl12p3fl1k0lkw10_k00000gn/T/pip-5RkJ0a-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/sh/gl953xl12p3fl1k0lkw10_k00000gn/T/pip-build-ZBmISy/MySQL-python

我已经用过:

^{pr2}$

以及sudo -E ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install mysql-python

sudo -E ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip mysql-python

问题依然存在。在

我的Xcode是版本6.4(6E35b)

我是优胜美地苹果操作系统的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值