Python 提示 “No matching distribution found for MySQLdb”


一、现象

终端运行:pip install MySQLdb

报:

ERROR: Could not find a version that satisfies the requirement MySQLdb (from versions: none)

ERROR: No matching distribution found for MySQLdb

 

 

二、解决

因运行环境为Python3

MySQLdb 用于 Python2 的环境模块, Python3中不支持

pymysql 用于 Python3

因此在Python3中用于链接Mysql数据库的接口时 用模块:pymysql,即安装命令为:

pip install pymysql

 

 

三、总结

 

多动手 多练习

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM