在Heroku部署Django应用时出错:未定义名称'install
更新:我发现问题出在requirements.txt文件中的“distribute==0.6.10”这一行。把这一行删掉后,问题就解决了,目前还没有因为没有这一行而出现任何错误……至少到现在为止是这样。
我正在按照这个教程进行操作:http://devcenter.heroku.com/articles/django
一切都进行得很顺利,直到我看到“运行工作进程”这一部分。我在requirements.txt文件中有以下内容:
Django==1.3
amqplib==1.0.1
anyjson==0.3.1
celery==2.3.3
distribute==0.6.10
django-celery==2.3.3
django-kombu==0.9.4
django-picklefield==0.1.9
gunicorn==0.12.2
kombu==1.4.1
psycopg2==2.4.2
pyparsing==1.5.6
python-dateutil==1.5
wsgiref==0.1.2
我还根据说明在Procfile和settings.py的末尾添加了适当的celery配置。当我部署应用时,出现了以下错误:
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
Complete output from command /tmp/build_2o84wdweodb97/bin/python2.7 -c "import setuptools;__file__='/tmp/build_2o84wdweodb97/build/distribute/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-LIti3K-record/install-record.txt --install-headers /tmp/build_2o84wdweodb97/include/site/python2.7:
完整的部署日志可以在这里找到:http://pastie.org/2609107
有没有人见过这个问题,或者知道怎么解决吗?
1 个回答
3
使用更新版本的distribute解决了这个问题。
distribute==0.6.21