zoukankan      html  css  js  c++  java
  • 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

    (参考网上链接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 MySQLMySQL Connector C 6.0.2目录,但从提示中看它要的是安装到C:Program Files (x86)MySQLMySQL 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

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

    再次pip install mysql-python 安装成功

  • 相关阅读:
    linux 中的vim的配置文件的位置
    centos find
    multi-cursor
    ctrlsf插件
    Vim的可视模式
    Vim的tagbar插件
    Vim的tag系统
    ~/.ctag的作用与配置
    在Vim里使用gtags-cscope
    查看Vim的option变量的值
  • 原文地址:https://www.cnblogs.com/fennudexiaoniao/p/7998553.html
Copyright © 2011-2022 走看看