在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. iOS -- MJrefresh

    - (void)refresh { MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingTarget:self r ...

  2. python 登陆接口

    #!/usr/bin/env pythonimport sysname = ''pw=''name_num = 0pw_num = 0#black_list = []with open('a.txt' ...

  3. webService访问加密-Soapheader

    WebService head加密,可以对 WebService设置访问用户名和密码,增强 WebService的安全性 使 WebService只能被授权用户使用. 具体实现步骤: 1. 定义一个  ...

  4. HttpModule与HttpHandler详解

    ASP.NET对请求处理的过程:当请求一个*.aspx文件的时候,这个请求会被inetinfo.exe进程截获,它判断文件的后缀(aspx)之后,将这个请求转交给 ASPNET_ISAPI.dll,A ...

  5. 使用 Daynamic 动态添加属性

    所谓的Dynamic 动态类型,页面也要是动态的(强撸) 很简单的 直接上代码: //案例一 DynamicpersonCollection = new ObservableCollection(); ...

  6. 【HDU 5855】Less Time, More profit(网络流、最小割、最大权闭合子图)

    Less Time, More profit Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/O ...

  7. 做哪些优化,才能让 UITabelView 更顺滑?(转)

    原文出处: Alexander Orlov   译文出处:南峰子(@南峰子_老驴) 转载自:ios.jobbole.com/83731/ 我已经在iOS这个最好的移动平台上有几年的开发经验了.在这期间 ...

  8. 数组与指针-----a[i]=*(a+i)=i[a]

    #include<stdio.h> #include<stdlib.h> int main(void) { ,,,,};//a[i]相当于*(a+i) printf(]); p ...

  9. Leetcode 200. number of Islands

    Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surro ...

  10. java 基础拾漏

    1.java语言支持的类型非为两类:基础类型(primitive Type) 和引用类型(Reference Type),基础类型8种 2.数组元素的类型是基本类型中的整数类型(byte,short, ...