No module named MYSQLdb 问题解决

对于不同的系统和程序有如下的解决方法:

  1. easy_install mysql-python (mix os)
  2. pip install mysql-python (mix os)
  3. apt-get install python-mysqldb (Linux Ubuntu)
  4. cd/usr/ports/databases/py-MySQLdb && make install clean (FreeBSD)
  5. yum install MySQL-python (linux Fedora, CentOS)
  6. pip install mysqlclient (Windows)

更多内容请参考下面的这两个链接:

http://stackoverflow.com/questions/454854/no-module-named-mysqldb

http://stackoverflow.com/questions/21440230/install-mysql-python-windows

    原文作者:Henry
    原文地址: https://zhuanlan.zhihu.com/p/38019237
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞