最近在安装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. BZOJ 1415: [Noi2005]聪聪和可可(记忆化搜索+期望)

    传送门 解题思路 还是比较简答的一道题.首先\(bfs\)把每个点到其他点的最短路求出来,然后再记忆化搜索.记搜的时候猫的走法是确定的,搜一下老鼠走法就行了. 代码 #include<iostr ...

  2. NX二次开发-UF_MODL_ask_point_containment获取一个点是在体(面,边)的边界内部,外部,还是边界上

    NX9+VS2012 #include <uf.h> #include <uf_modl.h> #include <uf_curve.h> #include < ...

  3. npm run 同时执行多个命令

    在项目中可能需要一套代码同时部署几套环境,每一次改动就需要同时打包N次.这时就需要能够一个命令同时打包多次,省去了很多麻烦. 这里我们需要用到 concurrently 这个 npm 包,能够实现我们 ...

  4. Fedora Linux 安装Qt5.2.0

    1.下载 qt-linux-opensource-5.2.0-x86-offline.run 2. chmod u+x ./qt-linux-opensource-5.2.0-x86-offline. ...

  5. 使用RAS+AES对接口数据加解密

    在实际开发中,会遇到两个系统之间传输数据,为了对传输的数据进行保护,需要发送方对接口数据进行加密,接收方对数据解密. 对数据加密,采用RSA+AES双重加密,是数据更加安全. 使用前提: 如果客户端本 ...

  6. 转-Windows下anaconda简单使用教程

    转自:https://www.cnblogs.com/Dota-wiki/p/7871838.html Anaconda is a completely free Python distributio ...

  7. 实战CGLib系列之proxy篇(一):方法拦截MethodInterceptor

    实战CGLib系列文章 本篇介绍通过MethodInterceptor和Enhancer实现一个动态代理. 一.首先说一下JDK中的动态代理: JDK中的动态代理是通过反射类Proxy以及Invoca ...

  8. Spring源码由浅入深系列二 类结构

    BeanFactory 上一章中,我们提过Spring的依赖注入容器是BeanFactory.BeanFactory是一个基础接口,它有一个默认实现类:DefaultListableBeanFacto ...

  9. 剑指offer——23调整数组顺序使奇数位于偶数前面

    题目描述 输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有的奇数位于数组的前半部分,所有的偶数位于数组的后半部分,并保证奇数和奇数,偶数和偶数之间的相对位置不变.   题解: 一种是数 ...

  10. neo4j数据库迁移---------Neo4j数据库导入导出的方法

    Neo4j数据进行备份.还原.迁移的操作时,首先要关闭neo4j; /usr/share/neo4j/bin neo4j stop 如果出现 Neo4j not running 出现这种情况, Neo ...