【发布时间】:2013-05-02 12:58:49
【问题描述】:
我刚刚学会了如何使用virtualenv,并安装了 Django 1.4.5。我假设virtualenv 为我创建了一个全新的工作环境,因此在安装了 Django 1.4.5 后,我将所有以前的文件复制到了virtualenv 环境中。
我尝试运行服务器,但收到错误消息 "no module named MySQLdb"。我认为这意味着我忘记安装 MySQL-python。我尝试通过
pip install MySQL-python
但我得到了这个错误
Downloading/unpacking MySQL-python
Running setup.py egg_info for package MySQL-python
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.24 (/home/bradford/Development/Django/django_1.4.5/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg))
Complete output from command python setup.py egg_info:
The required version of distribute (>=0.6.28) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.24 (/home/bradford/Development/Django/django_1.4.5/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg))
----------------------------------------
Command python setup.py egg_info failed with error code 2 in /home/bradford/Development/Django/django_1.4.5/build/MySQL-python
不太确定如何解决此问题 =/ 非常感谢任何帮助!
【问题讨论】:
标签: django virtualenv mysql-python