今天想在在win7 64位环境下使用python 操作mysql

在安装MySQL-python 时报错:

_mysql.c

_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No s uch file or directory

error: command '"C:\Users\fnngj\AppData\Local\Programs\Common\Microsoft\Visual C ++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2

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

Cleaning up... Command C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\use rs\\fnngj\\appdata\\local\\temp\\pip_build_fnngj\\MySQL-python\\setup.py';exec(c ompile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), _ _file__, 'exec'))" install --record c:\users\fnngj\appdata\local\temp\pip-peervp -record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\users\fnngj\appdata\local\temp\pip_build_fnngj\MySQL-pyt hon Storing debug log for failure in C:\Users\fnngj\pip\pip.log

太奇怪了,以前是在ubuntu/deepin 系统可以安装。换成win7 64位就不行了。

按理说win7都出来这么多年了,python也更新的这么猛的语言,怎么链接mysql就不行了。

百度了半天,找到了以下答案:

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

1)问题:_mysql.c(34) : fatal error C1083: Cannot open include file: ‘config-win.h’: No such file or directory error: command ‘”C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe”‘ failed with exitstatus 2

原因:原因是安装MySQL的时候没有安装C语言库。

解决:重新运行MySQL的安装程序,选择Modify,把“C Include Files / Lib Files”勾选上,并安装。

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

百度来百度去,就这么一个答案,都是复制粘贴的。害我反复把mysql装了几遍,跟本他妈的没找到“C Include Files / Lib Files” 选项在哪儿? 也许是mysql新版本没这选项了。

最后不得不FQ出去看看了。

原来还是驱动问题,关人家mysql啥事儿!

安装:MySQL-python-1.2.3.win-amd64-py2.7.exe 就可以了(百度csdn下载可以找到)

我的驱动是从这儿下的,不行!

https://pypi.python.org/pypi/MySQL-python/

也用 pip 装了,不行!

C:\Python27\Scripts>pip install MySQL-python

这pip居然检测不出我的系统版本。 还有为啥python官网搜索不到这个 64位的驱动,我也是醉了。

----

希望这个问题被百度收录,遇到这个问题的人,别在被上面的答案忽悠了,真不管人家mysql的事儿。

win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory的更多相关文章

  1. (转)win7 64 安装mysql-python:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    原文地址:http://www.cnblogs.com/fnng/p/4115607.html 作者:虫师 今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-pyth ...

  2. _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':问题的解决 mysql安装python

    在win7下安装了Python后,想安装python-MySQL,使用pip安装出现如下问题: >pip install MySQL-python _mysql.c(42) : fatal er ...

  3. (Python mysql驱动的解决)_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':问题的解决

    在win7下安装了Python后,想安装python-MySQL,使用pip安装出现如下问题: >pip install MySQL-python _mysql.c(42) : fatal er ...

  4. Python 安装MySQLdb模块遇到报错及解决方案:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    一.问题 系统:win7 64位 在下载MySQL-python-1.2.5.zip,使用python setup.py install 安装时,出现以下报错: _mysql.c(42) : fata ...

  5. _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':问题的解决

    在win7下安装了python后,想安装python-mysql,使用pip安装出现如下问题: >pip install MySQL-python _mysql.c(42) : fatal er ...

  6. 安装MySQL-python报错:_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory或者 build\lib.win-amd64-2.7\_mysql.pyd : fatal error LNK1120: 56 unresolved externa

    解决办法1: 直接下载MySQL-python-1.2.5.win-amd64/32-py2.7.exe,点击安装 此处要注意自己安装的Python和MySQL版本是64位还是32位,否则在进行安装M ...

  7. mysql-python 安装错误 fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    安装mysql-python之前, 请先安装setuptools. https://pypi.python.org/pypi/setuptools/7.0 下载mysql-python. 下载源码包. ...

  8. [Python]mysql-python 安装错误 fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

    需要安装mysql connector 前往 https://dev.mysql.com/downloads/connector/python/ 下载 选择Platform independence, ...

  9. win7 VC6.0 安装 fatal error C1083: Cannot open include file: 'Iphlpapi.h': No such file or directory

    解决方法:   第一步 安装SDK 第二步 将包含的api放在第一项

随机推荐

  1. JAVA关键字与保留字说明及使用

    1.abstract 2.boolean 3.break 4.byte 5.case 6.catch 7.char 8.class 9.continue 10.default 11.do 12.dou ...

  2. 微信小程序想要的是无法监测的流量dark social

    “微信小程序”将带来什么样的变化?就单单的是一个超级Web app?还是只是为了给大家手机节省一些空间?腾讯想要的是高达70%以上的“无法监测的巨大流量”,称之为“dark social”(暗社交). ...

  3. Shell脚本

    shell script,是一种为shell编写的脚本程序. 业界所说的shell通常是指shell脚本.shell和shell script.

  4. SharePreferences的DB实现

    存储一些简单数据的时候,最快的实现是用SharePreferences,但SharePreferences的可靠性不高,在某些非官方ROM上,总是存取失败.后来想到用数据库来存取.产品中,存取的数据项 ...

  5. IOS单元测试,OCMock

    1.环境搭建 使用官方推荐,手动搭建.. 1.下载所需文件 http://ocmock.org/download/ 根据自己的需要下载不同的版本. 打开iOS library文件夹,里面就有需要用到的 ...

  6. 【JSOI2007】麻将 bzoj 1028

    Description 麻 将是中国传统的娱乐工具之一.麻将牌的牌可以分为字牌(共有东.南.西.北.中.发.白七种)和序数牌(分为条子.饼子.万子三种花色,每种花色各有一到 九的九种牌),每种牌各四张 ...

  7. 未备案域名打开国内服务器上的网站(绑定国外空间并判断url后跳转引用)

    场景:由于域名没备案不能绑定国内服务器,通过先绑定国外空间,在空间着陆页判断当前url,打开不同的页面.页面上通过iframe引用国内服务器上的目标网站. 实现:未备案域名打开国内服务器上的网站. 国 ...

  8. Odd Even Linked List

    Given a singly linked list, group all odd nodes together followed by the even nodes. Please note her ...

  9. RobotFrameWork(二)Ride简单使用及快捷键

    一.简单示例 注意:以下操作使用到快捷键的,请先确保没有与其他软件的快捷键设置冲突,比如sogou拼音.有道词典等等 1.启动ride 启动ride方法: 1)  通过界面图标 2)  dos命令行: ...

  10. mount挂载问题

    安装nfs-utils即可