如何使用MySQL与Python 3.3和Django 1.5? [英] How can I use MySQL with Python 3.3 and Django 1.5?
本文介绍了如何使用MySQL与Python 3.3和Django 1.5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Django需要MySQL-python包来操纵MySQL,但MySQL-python不支持Python 3.3。我已经尝试过MySQL-for-Python-3,但是它不起作用。
请帮忙!非常感谢!
Django needs MySQL-python package to manipulate MySQL, but MySQL-python doesn't support Python 3.3. I have tried MySQL-for-Python-3, but it doesn't work. Please help! Thanks a lot!
推荐答案
Django 1.5在Python 2.7下工作,所以你需要用于Python的分发的MySQL-python包;只要做:
Django 1.5 works under Python 2.7, so you need the MySQL-python package for that distribution of Python; just do:
sudo apt-get install python-mysqldb
这篇关于如何使用MySQL与Python 3.3和Django 1.5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文