一、现象

终端运行:pip install MySQLdb

报:

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

ERROR: No matching distribution found for MySQLdb

Python 提示 “No matching distribution found for MySQLdb”

 

 

二、解决

因运行环境为Python3

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

pymysql 用于 Python3

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

pip install pymysql

 

 

三、总结

 

多动手 多练习

 

相关文章:

  • 2021-09-19
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2021-09-26
猜你喜欢
  • 2021-04-06
  • 2021-05-22
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
相关资源
相似解决方案