【问题标题】:Configuring MySQL with python on OS X lion在 OS X lion 上使用 python 配置 MySQL
【发布时间】:2013-06-03 20:23:08
【问题描述】:

MySQL 安装在 /usr/local/mysql

在site.cfg 中mysql_config 的路径是/usr/local/mysql/bin/mysql_config

但是当我尝试在终端中构建时,我得到了这个错误:

hammads-imac-2:MySQL-python-1.2.4b4 syedhammad$ sudo python setup.py build 运行构建 运行 build_py 复制 MySQLdb/release.py -> build/lib.macosx-10.8-intel-2.7/MySQLdb 运行 build_ext 构建“_mysql”扩展 clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes - Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,4,'beta',4) -D_version_ =1.2.4b4 -I/usr/local/mysql/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _mysql.c -o build/temp.macosx-10.8 -intel-2.7/_mysql.o -Wno-null-conversion -Os -g -fno-strict-aliasing -arch x86_64 无法执行clang:没有这样的文件或目录 错误:命令“clang”失败,退出状态为 1

请帮忙

【问题讨论】:

    标签: python mysql macos


    【解决方案1】:

    您可能需要 Xcode 的命令行工具。

    下载最新版本的 Xcode,然后转到“首选项”,选择“下载”选项卡,然后安装命令行工具。

    【讨论】:

      猜你喜欢
      • 2012-04-05
      • 1970-01-01
      • 1970-01-01
      • 2023-04-02
      • 1970-01-01
      • 2012-01-03
      • 1970-01-01
      • 2012-01-07
      • 1970-01-01
      相关资源
      最近更新 更多