【发布时间】:2014-01-31 18:55:01
【问题描述】:
我目前正在使用 OSX 上的 1.6.1 版和 2.7.5 版 python 完成官方 Django 教程。我正在处理第 2 部分,即管理界面。当我尝试转到 /admin/polls/poll/ 时,我收到以下错误报告:
ImproperlyConfigured at /admin/polls/poll/
This query requires pytz, but it isn't installed.
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/polls/poll/
Django Version: 1.6.1
Exception Type: ImproperlyConfigured
Exception Value:
This query requires pytz, but it isn't installed.
Exception Location: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py in datetime_trunc_sql, line 196
Python Executable: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.7.5
我尝试通过安装 pip(需要安装 setuptools)来安装 pytz,但这并没有什么区别。另外,我正在第二次阅读本教程,我知道一个月前我没有遇到这个问题。更新到 Mavericks 会不会导致一些问题?
【问题讨论】: