原文地址:http://www.cnblogs.com/fnng/p/4115607.html

作者:虫师

今天想在在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

(转)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

    今天想在在win7 64位环境下使用python 操作mysql 在安装MySQL-python 时报错: _mysql.c _mysql.c(42) : fatal error C1083: Can ...

  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. SecureCRT 常用命令

    常用命令:一.ls 只列出文件名 (相当于dir,dir也可以使用) -A:列出所有文件,包含隐藏文件. -l:列表形式,包含文件的绝大部分属性. -R:递归显示. --help:此命令的帮助. 二. ...

  2. LocalDB 静默安装

    cmd命令:msiexec /i SqlLocalDB.msi /qn IACCEPTSQLLOCALDBLICENSETERMS=YES 注意:需要以管理员身份运行

  3. 浅谈spring 声明式事物

    此处主要讲讲事物的属性. 事物属性包含了五个方面: 1.传播行为 2.隔离规则 3.回滚规则 4.事物超时 5.是否只读 一.传播行为 事务的第一个方面是传播行为(propagation behavi ...

  4. css写出0.5px边框(一)

    在移动端会出现线条太粗的现象,简单来说,是因为手机端的像素单位和ui的图比例是2:1,所以ui图的1px边框对我们来说就是0.5px,但是浏览器渲染的最小单位就是1px,下面给几种方法用css写出0. ...

  5. IE不能上网,但是其他浏览器可以

    打开IE_工具_internet选项_连接_局域网设置_(勾选)自动检测配置其它的勾去掉,确定.

  6. Android笔记:动画

    android:fromDegrees 起始的角度度数 android:toDegrees 结束的角度度数,负数表示逆时针,正数表示顺时针.如10圈则比android:fromDegrees大3600 ...

  7. vmware备忘

  8. 素数的平方阶群必为Abel群

    定理  设$p$为素数,则$p^2$阶群$G$必为Abel群.

  9. tp框架之自动验证表单

    tp框架的create自动加载表单的方法可以自动根据自己定义的要求来验证表单里面的内容,但是由于是在后台执行代码,会拖慢程序运行速度,所以还是建议通过前端js来进行判断,后台只进行数据库的查询以及传值 ...

  10. javascript 框架、根基技巧、布局、CSS、控件 JavaScript 类库

    预筹备之 JavaScript 今朝支流的 JavaScript 框架排名中,jQuery 和 Ext 可算是佼佼者,得到了用户的普遍好评.海内的一些框架许多也是模仿 jQuery 对 JavaScr ...