目录
2. Python3 + PyMysql 访问mysql数据库
1.python2+MySQLdb访问mysql
目标:安全python2 使用的mysqlclient 连接数据库模块
pip install mysqlclient
出现的问题:用命令pip install mysqlcient 出现问题 python3 install mysqlclient required visual C++ 14.0
平台:windows7 32bit python版本2.7 pip 版本 9.0
百度查询 python2 install mysqlclient required visual C++ 14.0 问题
需要安装 到网址https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python 下下载对应的.whl 文件来安装。截图如下:
执行安装命令:使用 pip install mysqlclient-1.3.13-cp37-cp37m-win32.whl
截图如下:
查看python 安装目录下的 Lib/site-packages 中有了MySQLdb 模块
2. Python3 + PyMysql 访问mysql数据库
https://github.com/PyMySQL/PyMySQL
PyMySQL在github 上的地址,下载下来进入木 python install setup 进行安装