zoukankan      html  css  js  c++  java
  • windows下python操作mysql模块安装

    百度教程说安装

    pip install mysqldb

    这在我的电脑上安装失败:

      Could not find a version that satisfies the requirement mysqldb (from versions
    : )
    No matching distribution found for mysqldb

    所以应该:

    pip install MySQL-python

    报错:

    error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
    Get it from http://aka.ms/vcpython27

    缺少vc的一个库,我们根据提示到这里下载一下,然后安装,再次执行命令 :pip install mysql-python

    还是报错:

    No such file or directory
        error: command '"C:Users年浩AppDataLocalProgramsCommonMicrosoftVisua
    l C++ for Python9.0VCBinamd64cl.exe"' failed with exit status 2

    这是因为缺少驱动。

    MySQL-python-1.2.3.win-amd64-py2.7.exe

    给两个下载地址:http://download.csdn.net/detail/weibin0320/6663763

    或者:http://www.jb51.net/softs/73369.html#download

    安装后再次执行install 命令。ok,没有报错。我们测试一下。

    import MySQLdb

    没有报错,安装成功。。



  • 相关阅读:
    linux
    java对象结构
    jvm之java类加载机制和类加载器(ClassLoader)的详解
    二进制运算符及补码
    java导出word格式的文件
    rpm命令详解
    word转pdf
    应用缓存
    fullPage.js+Stellar.js+circlr.js
    评分案例
  • 原文地址:https://www.cnblogs.com/superxuezhazha/p/6619036.html
Copyright © 2011-2022 走看看