"Could not find a version that satisfies the requirement MySQLdb"问题解决办法

最近学习Flask数据库,在链接本地数据库的时候使用MySQLdb,报错未安装
在这里插入图片描述
于是终端采用pip安装(我的python环境是python3.5),但是报错Could not find a version that satisfies the requirement MySQLdb
在这里插入图片描述
原因及解决办法:
MySQLdb不支持python3环境,因此可以使用PyMySQL完美解决,只需将代码中的MySQLdb换成PyMySQL即可

发布了29 篇原创文章 · 获赞 10 · 访问量 3181

猜你喜欢

转载自blog.csdn.net/sinat_40875078/article/details/105499866