在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

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

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

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

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

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

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

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

  8. 解决c1xx fatal error C1083 Cannot open source file

    在项目开发过程中,遇到一个问题,一个工程B导入另外一个工程A的生产代码,出现这个错误,最后查阅资料发现是文件路径太深,导致文件路径字符超过了217字符. 写了一个测试Demo来验证: 一.新建Win3 ...

  9. 解决错误 fatal error C1010: unexpected end of file while looking for precompiled head

    在编译VS时候,出现fatal error C1010: unexpected end of file while looking for precompiled head. 问题详解:致命错误C10 ...

随机推荐

  1. java beanUtils框架

    beanUtils是Apache觉得sun公司的内省不够爽,自己又开发了一套可以操作JavaBean的API 所以beanUtils是第三方jar包,使用beanUtils要导包: 在工程目录下新建一 ...

  2. Nginx中的安全配置

    1.测试环境 操作系统:CentOS6.5 Web服务器:Nginx1.4.6 Php版本:Php5.4.26 2.Nginx介绍 1.nginx本身不能处理PHP,它只是个web服务器,当接收到请求 ...

  3. HDUOJ----2487Ugly Windows

    Ugly Windows Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Tota ...

  4. Foundations of Machine Learning: Rademacher complexity and VC-Dimension(1)

    Foundations of Machine Learning: Rademacher complexity and VC-Dimension(1) 前面两篇文章中,我们在给出PAC-learnabl ...

  5. eclipse 在Servers窗口创建一个Tomcat 6.0 Server失败

    web项目部署到tomcat除了用eclipse插件,eclipse也有一个Servers窗口来部署.   问题背景:Servers窗口,我之前创建过一个Tomcat v6.0 Server,后来我把 ...

  6. JQueryMobile开发必须的知道的知识(转)

    移动Web页面的基本组成元素: 页面头部,页面内容,页面底部 <!DOCTYPE html> <html> <head> <title>My Page& ...

  7. Google的创新九原则(转)

    原文url:http://www.365xiaoxi.com/All/News/2013-11-22/6432.html 想知道是什么让Google成为生产力与创造力的圣杯?当然不是喝山景城脚下的神水 ...

  8. python学习笔记——正则表达式regex

    1 概述 1.1 定义 本质是由一系列字符和特殊符号组成的字串,用来表示一定规则的某一类字符串. 1.2 特点 正则表达式是一个独立的技术,其在多种编程语言中使用. 在python语言中的正则表达式模 ...

  9. python学习笔记013——模块中的私有属性

    1 私有属性的使用方式 在python中,没有类似private之类的关键字来声明私有方法或属性.若要声明其私有属性,语法规则为: 属性前加双下划线,属性后不加(双)下划线,如将属性name私有化,则 ...

  10. Linux内存初始化(一)

    一.前言 一直以来,我都非常着迷于两种电影拍摄手法:一种是慢镜头,将每一个细节全方位的展现给观众.另外一种就是快镜头,多半是反应一个时代的变迁,从非常长的时间段中,截取几个典型的snapshot,合成 ...