在win7下安装了Python后,想安装python-MySQL,使用pip安装出现如下问题:

>pip install MySQL-python

_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such 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

网上一般的解释是,重新安装mysql并在安装mysql是选择安装c++的编译器。。。

我虽然没试过,但感觉肯定行不通啊,我只是想装一个可以让python远程连接mysql的包而已,管本地mysql什么事?有些解释真是误人子弟。

但错误提示里也谢了缺少C++的相关环境,后来在网上找到方法了:
方法如下:

1.在http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python下载对应的包版本,如果是win7 64位2.7版本的python,就下载

MySQL_python-1.2.5-cp27-none-win_amd64.whl

然后在命令行执行pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl

当然需要在cmd下跳转到下载MySQL_python-1.2.5-cp27-none-win_amd64.whl的目录下

然后就安装成功了MySQL-python

参考链接:

http://www.cnblogs.com/fnng/p/4115607.html

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

  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. 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 ...

  3. _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 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 ...

  5. 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 ...

  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. fatal error C1083: Cannot open include file: 'openssl/opensslv.h'

    在安装针对ELK系统的警告工具elastalert时,报错: fatal error C1083: Cannot open include file: 'openssl/opensslv.h',如下图 ...

  8. 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. 下载源码包. ...

  9. pip install mysql-python报错1. Unable to find vcvarsall.bat 2 fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 3.error: command 'mt.exe' failed with exit statu

    最近在安装mysql -python 时报错折腾了半天,通过以下方法解决: 1. pip install mysql-python报错 Unable to find vcvarsall.bat (参考 ...

随机推荐

  1. 十天冲刺---Day2

    站立式会议 站立式会议内容总结: git上Issues新增内容: 燃尽图 照片

  2. oracle job有定时执行的功能,可以在指定的时间点或每天的某个时间点自行执行任务。

    来源于:http://www.cnblogs.com/wangfg/p/5110831.html 一.查询系统中的job,可以查询视图 --相关视图 select * from dba_jobs; s ...

  3. extjs5 一个容器中有几个组件公用一个控制器和一个模型

    Ext.define('TestViewModel', { extend: 'Ext.app.ViewModel', alias: 'viewmodel.test', // connects to v ...

  4. [转]制作png格式透明图片的简易方法

    原文地址:http://blog.csdn.net/zhouyingge1104/article/details/24460743 photoshp之类的专业软件太复杂,其实,制作透明图标有比较简易的 ...

  5. python之旅【第二篇】

    1,文件操作 找到文件-----打开文件------文件操作-----------文件关闭 file_open = file(文件路径,模式) 读取文件: M.read() obj = M.readl ...

  6. static 静态导包

    静态导入 ArrayUtils 类的 INDEX_NOT_FOUND 属性和 add 方法 import static org.apache.commons.lang3.ArrayUtils.INDE ...

  7. Echarts-画堆积柱状图

    导入echarts包 <script src='../scripts/libraries/echarts/echarts-all.js'></script> 堆积图js $(f ...

  8. XAML: x:DeferLoadStrategy, x:Null

    x:DeferLoadStrategy="Lazy" - 用于指定一个 UIElement 为一个延迟加载元素 x:Null - null 示例1.x:DeferLoadStrat ...

  9. 控件(选择类): Selector, ComboBox

    1.Selector(基类) 的示例Controls/SelectionControl/SelectorDemo.xaml <Page x:Class="Windows10.Contr ...

  10. String,Date,XMLGregorianCalendar的转换

    常见标准的写法"yyyy-MM-dd HH:mm:ss",区分大小写,时间是24小时制,24小时制转换成12小时制只需将HH改成hh. String to Date: String ...