windows上安装mysql connector/python或者PyMySQL驱动
程序员文章站
2022-03-27 12:53:45
windows上安装mysql connector/python1、前提是你已经装好python:命令行输入”python“2、命令行退出python:3、执行命令:pip install mysql-connector系统会自动安装最新版本mysql-connector驱动,如果报错,可以加上版本号甚至镜像:pip install mysql-connector2.2.9或者:pip install mysql-connector2.2.9 -i https://pypi.tuna....
windows上安装mysql connector/python
1、前提是你已经装好python:命令行输入”python“
2、命令行退出python:
3、执行命令:pip install mysql-connector
系统会自动安装最新版本mysql-connector驱动,如果报错,可以加上版本号甚至镜像:
pip install mysql-connector2.2.9
或者:
pip install mysql-connector2.2.9 -i https://pypi.tuna.tsinghua.edu.cn/simple
4、若仍报错无法安装成功,只能下载后安装了:
https://dev.mysql.com/downloads/connector/python/
download后提示无法安装成功,真遗憾,那就安装PyMySQL驱动吧:
5、命令行输入:pip3 install PyMySQL
验证是否安装成功:
安装PyMySQL驱动成功!
本文地址:https://blog.csdn.net/duanchaoxuan/article/details/110490617