python:windows下python2.7安装mysql-python失败【转】
转自:https://www.cnblogs.com/yujiebingqing/p/9633476.html
当我们尝试用:
1 pip install mysql-python #并不是MySQLdb
企图安装mysql时,我们会发现一开始进行的很顺利,但最后就会提示:
1 error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
2 Get it from http://aka.ms/vcpython27
因此我们根据上面提供的网址下载VCforPython27
安装即可。
安装驱动
当我们尝试再次运行pip install mysql-python的命令时,我们发现又出错了:
1 No such file or directory
2 error: command '"C:\Users\xxx\AppData\Local\Programs\Common\Microsoft\Visua
3 l C++ for Python\9.0\VC\Bin\amd64\cl.exe"' failed with exit status 2
我们需要下载驱动:
MySQL-python-1.2.3.win-amd64-py2.7.exe (1.0 MiB)
(http://www.codegood.com/download/11/)
安装成功!!!!
之前百度了 好久都没有成功,原来是照的驱动的问题,找到可以直接拿来用的.exe文件实在是不容易啊~~~
另外:安装mysqlclient出错,现在whl文件直接pip方式安装
下载对应版本:https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
执行如pip install mysqlclient-1.4.1-cp27-cp27m-win_amd64.whl
python:windows下python2.7安装mysql-python失败【转】的更多相关文章
- Windows下python2.7安装64位mysqlclient
在使用python调用mysql数据库的时候,需要引入对应的数据包 import MySQLdb 如果提示找不到对应的包,说明还需要安装对应的mysql数据库客户端操作的python包.在python ...
- [报错解决] 关于windows下 使用Anaconda3安装的python无法使用ssl模块问题.关联pip无法下载https
关联错误: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not ...
- windows下通过压缩包安装MySQL
一.下载压缩包 二.解压缩后存放在该路径下 三.配置环境变量 将D:\Program Files\mysql-8.0.11-winx64\bin添加到用户PATH变量或系统PATH变量中 ...
- 在windows下使用pip安装python包遇到缺失stdint.h文件的错误
今天在windows上使用pip安装一个python包python-lzf时遇到如下的错误: fatal error C1083: Cannot open include file: 'stdint. ...
- windows下python2和python3同时安装ipython
1.ipython简介: IPython 是一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许 ...
- Windows环境下 PyQt5 如何安装MySql驱动 (PyQt5连接MYSQL时显示Driver not loaded解决方案)
参考文章: https://blog.csdn.net/qq_38198744/article/details/80261695 前文说过如何在Ubuntu环境下 为PyQt5 安装MySql驱动, ...
- Windows下将gvim8配置为Python IDE
目录 1.准备工作 2.安装 3.配置 _vimrc 4.编写和编译运行程序 正文 Windows下将gvim配置为Python IDE 回到顶部 1.准备工作 将下面的安装包或者文件下载好 1) P ...
- Python Windows下打包成exe文件
Python Windows 下打包成exe文件,使用PyInstaller 软件环境: 1.OS:Win10 64 位 2.Python 3.7 3.安装PyInstaller 先检查是否已安装Py ...
- CentOS下安装MySQL,Windows下使用Navicat for MySql连接
安装 查看有没有安装过: yum list installed mysql* rpm -qa | grep mysql* 查看有没有安装包: yu ...
随机推荐
- vlookup使用
数据处理过程中,需要excel进行简单的操作,比如vlookup,摸索之后,总结如下:
- backref 用法
源码 def backref(name, **kwargs): """Create a back reference with explicit keyword argu ...
- C++中const的用法
1.const修饰普通变量和指针 (1).const修饰普通变量 其写法有2种:a.const type value; b.type const value; 这两种写法本质上是一样的.其含义是: ...
- Google - Largest Sum Submatrix
Given an NxN matrix of positive and negative integers, write code to find the submatrix with the lar ...
- 像使用数据库一样使用xml
目录 xml简介 语言结构 tinyxml 下载tinyxml 应用实例 tinyxml的封装 封装源码 实际应用 xml简介 XML 没什么特别的.它仅仅是纯文本而已.有能力处理纯文本的软件都可以处 ...
- php使用fastdfs
php的服务器地址:10.10.1.2 fastdfs tracker地址:10.15.1.2 fastdfs storage地址:10.16.1.2 将fastdfs的源码上传到php所在服务器,进 ...
- Python 3 教程
http://www.runoob.com/python3/python3-tutorial.html https://www.jianshu.com/p/f1332c58ca86
- MyBatis DTD文件下载地址
下载链接: http://mybatis.org/dtd/mybatis-3-config.dtdhttp://mybatis.org/dtd/mybatis-3-mapper.dtd
- SpringBoot启动源码探究---getRunListener()
该方法目的是获取SpringApplicationRunListener getRunListener()-----调用----> getSpringFactoriesInstances()-- ...
- VS2015Git 源代码工具使用
1. 首先到源代码托管平台申请个账户:https://git.oschina.net/ 2.创建流程图: 2.1 开始创建项目: 2.2 3. 4. 作者:江宁织造 qq空间:苦心孤诣博客:http: ...