没有名为MySQLdb的模块 [英] No module named MySQLdb
本文介绍了没有名为MySQLdb的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
您需要使用以下命令之一。哪个取决于您使用的操作系统和软件。
- easy_install mysql-python (mix os)
- pip install mysql-python (mix os)
- apt-get install python-mysqldb < (Linux Ubuntu,...)
- cd / usr / ports / databases / py-MySQLdb&& make install clean (FreeBSD)
- yum install MySQL-python (Linux Fedora,CentOS ...)
对于Windows,请参阅此答案:安装mysql-python(Windows)
I am using Python version 2.5.4 and install MySQL version 5.0 and Django. Django is working fine with Python, but not MySQL. I am using it in Windows Vista.
解决方案
You need to use one of the following commands. Which one depends on what OS and software you have and use.
- easy_install mysql-python (mix os)
- pip install mysql-python (mix os)
- apt-get install python-mysqldb (Linux Ubuntu, ...)
- cd /usr/ports/databases/py-MySQLdb && make install clean (FreeBSD)
- yum install MySQL-python (Linux Fedora, CentOS ...)
For Windows, see this answer: Install mysql-python (Windows)
这篇关于没有名为MySQLdb的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文