magicnet

python2.7.12安装MySQLdb模块方法

pip安装失败采用whl安装

1、采用pip install MySQL-python 安装失败

安装过程

1、下载地址:http://www.lfd.uci.edu/~gohlke/pythonlibs/

image.png

2、搜索Ctrl+f 输入 MySQL-python

image.png

3、下载并将其文件放置Python安装目录(本人D:\Python27\Scripts)

image.png

4、切换  cd D:\Python27\Scripts    d:\

image.png

5、输入pip命令:pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl

6、验证:导入模块正确,可以查看相关的方法

image.png

posted @ 2017-11-29 11:26  zksfyz  阅读(3075)  评论(0编辑  收藏  举报