相关疑难解决方法(0)

cc1:错误:在mac 10.7.5上安装python-mysql时无法识别的命令行选项"-Wno-null-conversion"

这个错误破坏了我在Mac 10.7.5上的python-mysql安装.这是步骤

  1. 安装的python是2.7.1,mysql是5.6位的64位.
  2. 正在安装的python-mysql是1.2.4,也尝试过1.2.3
  3. 安装配置

    1) sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
    2) Edit the setup_posix.py and change the following mysql_config.path = "mysql_config" to mysql_config.path = "/usr/local/mysql/bin/mysql_config" 
    3) sudo python setup.py build
    
    Run Code Online (Sandbox Code Playgroud)

这是构建的堆栈跟踪

running build
running build_py
copying MySQLdb/release.py -> build/lib.macosx-10.7-intel-2.7/MySQLdb
running build_ext
building '_mysql' extension
llvm-gcc-4.2 -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 -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -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.7-intel-2.7/_mysql.o -Wno-null-conversion -Os …
Run Code Online (Sandbox Code Playgroud)

python mysql macos mysql-python python-2.7

9
推荐指数
1
解决办法
1万
查看次数

安装pandas的问题:"命令'llvm-gcc-4.2'失败,退出状态为1"

我想用Python 2.7和"sudo pip install pandas"在MAC OS X 10.7上安装pandas.我得到的一些输出:

Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pandas/index.c -o build/temp.macosx-10.7-intel-2.7/pandas/index.o
    In file included from pandas/index.c:317:
    pandas/src/numpy_helper.h: In function ‘infer_type’:
    pandas/src/numpy_helper.h:32: error: ‘PyDatetimeArrType_Type’ undeclared (first use in this function)
    pandas/src/numpy_helper.h:32: error: (Each undeclared identifier is reported only once
    pandas/src/numpy_helper.h:32: error: for each function it appears in.)
    pandas/src/numpy_helper.h: In function ‘get_datetime64_value’:
    pandas/src/numpy_helper.h:53: error: ‘PyDatetimeScalarObject’ undeclared (first use in this function)
    pandas/src/numpy_helper.h:53: error: expected expression before ‘)’ token
    pandas/src/numpy_helper.h: In function ‘is_datetime64_object’:
    pandas/src/numpy_helper.h:84: error: ‘PyDatetimeArrType_Type’ undeclared (first use in this …
Run Code Online (Sandbox Code Playgroud)

python macos gcc numpy pandas

4
推荐指数
1
解决办法
2020
查看次数

标签 统计

macos ×2

python ×2

gcc ×1

mysql ×1

mysql-python ×1

numpy ×1

pandas ×1

python-2.7 ×1