最近在安装mysql -python 时报错折腾了半天,通过以下方法解决:

1. pip install mysql-python报错 Unable to find vcvarsall.bat

(参考网上链接http://blog.csdn.net/secretx/article/details/17472107)

解决方法:我的vs版本是2013所以设置环境变量: VS90COMNTOOLS=%VS120COMNTOOLS%

设置好后错误Unable to find vcvarsall.bat不再出现,但出现  fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

2. 解决错误:fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory  

(参考网上链接:http://blog.csdn.net/xxm524/article/details/48754139)

1) 安装mysql connector, 可根据系统版本选择安装32位或64位的, 下载地址:

http://dev.mysql.com/downloads/connector/c/6.0.html#downloads

2) 安装Microsoft Visual C++ Compiler for Python 2.7,要是安装mysql-python需要乃至vc的一些运行库,下载地址:

http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266

再次 pip install mysql-python仍然有错误

3)解决方法:mysql connector之前安装的是64位,安装到了C:\Program Files \MySQL\MySQL Connector C 6.0.2目录,但从提示中看它要的是安装到C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2,因此应该安装32位的mysql connector;

重新安装32位的mysql connector, 重新执行pip install MySQL-python

仍然报错error: command 'mt.exe' failed with exit status 31

3.解决错误error: command 'mt.exe' failed with exit status 31

编辑Python27\Lib\distutils\msvc9compiler.py,查找ld_args.append('/MANIFESTFILE:' + temp_manifest)一行,在其后添加一行,内容为ld_args.append('/MANIFEST')

再次pip install mysql-python 安装成功

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的更多相关文章

  1. 安装visual stdio 2017后依然报错:Unable to find vcvarsall.bat

    安装visual stdio 2017后依然报错:Unable to find vcvarsall.bat 解决办法:更新setuptools 原文章:https://blog.csdn.net/wl ...

  2. pip install cv2 安装报错

    pip install cv2 安装报错是一个常见现象: ERROR: Could not find a version that satisfies the requirement cv2 (fro ...

  3. python pip install XXX出现报错问题

    重装Anacondas后,将pip 和python.exe路径加入到环境变量后直接在cmd窗口进行pip 操作,报错如下 报错内容为: pip is configured with locations ...

  4. Python3.6.2安装pip install paramike模块报错

    问题描述: 在有几台电脑上pip install paramike报错 报错内容: Could not find a version that satisfies the requirement sq ...

  5. pip install selenium==版本号 报错

    安装selenium是注意不要带版本号直接用如下命令: pip install selenium

  6. 简单解决python安装中的Unable to find vcvarsall.bat问题

    使用python36安装python的murmurhash的时候遇到上述问题,原因是没有找到vcvarsall.bat.查找vcvarsall.bat的方法是定义在_msvccompiler.py文件 ...

  7. vs2013 报错error C1083: 无法打开包括文件:“gl\glew.h”: No such file or directory\

    vs报错诸如如无法打开“gl\xxx.h”时, 解决方法: 1.去http://glew.sourceforge.net/下载相关文件,2.在下载下来的文件里找到xxx.h,将其复制到vs的相关目录下 ...

  8. pip install urllib3[secure] 报错 error: ffi.h: No such file or directory

    解决 sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging pyt ...

  9. python27(32位)安装模块报错“error: Unable to find vcvarsall.bat”

    1)首先,下载一个Microsoft Visual C++ Compiler for Python 2.7的补丁,下载地址在这里: http://www.microsoft.com/en-us/dow ...

随机推荐

  1. jq-demo-阻止冒泡,阻止默认行为

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  2. Atcoder arc092

    E-Both Sides Merger 给你一个序列,支持两种操作,直到序列中只有一个数时停下来,使得剩下数最大,并输出选数方案. 操作1:扔掉一个最前端或最后端的元素.操作2:选取一个不在边界上的元 ...

  3. leetcood学习笔记-965-单值二叉树

    题目描述; 第一次提交; class Solution: def isUnivalTree(self, root: TreeNode) -> bool: if root == None: ret ...

  4. springMVC快速入门 共分为五步

    springMVC快速入门 共分为5步分别为: 1 导入依赖 ​​ 2 spring-mvc.xml 配置 ​ 3 web.xml配置 ​ 4 自定义一个核心控制类 ​ 5 页面配置 详细步骤以及代码 ...

  5. 在IDEA安装SonarLint插件的步骤和使用方法

    1.安装SonarLint插件方式 2.使用方式 3.效果

  6. Java高新技术第三篇:注解的使用

    我们知道注解是在JDK1.5引入的,可能有的人没有用过注解,所以感觉注解这个东西没有什么用,但是深入了解注解,对以后学习框架有所帮助的,后面提到的JavaWeb的框架中很多都是基于注解的技术, 其实注 ...

  7. iOS 多层级的immutable objects 转换成 mutable objects

    第一种方法是:将多层级的递归转换 方法: +(id) recursiveMutable:(id)object { if([object isKindOfClass:[NSDictionary clas ...

  8. mdk keil 指定变量、函数存储位置,使用 Scatter-Loading Description File, __attribute__(("section“))

    0. 数据类型说明 主要包括4类: Code (inc. data) ,属于RO,也就是写的函数代码(包括代码中的变量) RO Data , 属于RO,使用const修饰的变量. RW Data, 属 ...

  9. markdown开篇

    def show(): print("你好世界!") print("实习的日子还是得好好学习呀!") print("加油 各位!")

  10. RHEL7更换yum源

    1,删除注册和订阅提示 查找subscription-manager相关组件: rpm -qa | grep subscription-manager 删除subscription-maanager相 ...