gcc失败,在Cygwin上安装Python MySQL库 [英] gcc failed with install Python MySQL libraries on Cygwin

查看:440
本文介绍了gcc失败,在Cygwin上安装Python MySQL库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在Cygwin盒上安装 oursql MySQLdb 。 ( Pywikibot 可以使用。)
不幸的是两个 easy_install 以及 pip 无法安装。

I want to install either oursql or MySQLdb on a Cygwin box. (Pywikibot can work with either.) Unfortunately both easy_install as well as pip fail at installing both.

easy_install-2.7 oursql

Searching for oursql
Reading https://pypi.python.org/simple/oursql/
Reading http://launchpad.net/oursql
Best match: oursql 0.9.3.1
Downloading https://pypi.python.org/packages/source/o/oursql/oursql-0.9.3.1.zip#md5=ad599ea2d95fc695df7195e9801b45c2
Processing oursql-0.9.3.1.zip
Writing /tmp/easy_install-kA8kUA/oursql-0.9.3.1/setup.cfg
Running oursql-0.9.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-kA8kUA/oursql-0.9.3.1/egg-dist-tmp-Jh5tJ1
cython not found, using previously-cython'd .c file.
mysql_config --cflags
In file included from oursqlx/oursql.c:235:0:
oursqlx/compat.h:13:19: fatal error: mysql.h: No such file or directory
 #include "mysql.h"
                   ^
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

easy_install-2.7 mysql-python

Searching for mysql-python
Reading https://pypi.python.org/simple/mysql-python/
Best match: MySQL-python 1.2.5
Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip#md5=654f75b302db6ed8dc5a898c625e030c
Processing MySQL-python-1.2.5.zip
Writing /tmp/easy_install-JwMXUV/MySQL-python-1.2.5/setup.cfg
Running MySQL-python-1.2.5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-JwMXUV/MySQL-python-1.2.5/egg-dist-tmp-jjPy0m
error: Setup script exited with error: command 'gcc' terminated by signal 11

我在过去十年没有做太多的 gcc 修复,所以我不知道如何处理这个。

I haven't done much gcc fixing in the past decade so I'm not sure how to handle this.

推荐答案

尝试这样做,这可能会帮助您: Windows GCC(MinGW)二进制文件对于Python开发人员

Try this, this may help you: Windows GCC (MinGW) binaries for Python developers

这篇关于gcc失败,在Cygwin上安装Python MySQL库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆