python - Dajaxice 的 django/python TEMPLATE_LOADER 错误

标签 python ajax django dajaxice

我想使用 django/djanxice 并已在 setup.py、url.py 等中进行设置...

但是当我运行服务器时,发生了错误。

/Library/Python/2.7/site-packages/django/template/loader.py:113: UserWarning: Your TEMPLATE_LOADERS setting includes 'django.template.loaders.eggs.Loader', but your Python installation doesn't support that type of template loading. Consider removing that line from TEMPLATE_LOADERS.
  warnings.warn("Your TEMPLATE_LOADERS setting includes %r, but your Python installation doesn't support that type of template loading. Consider removing that line from TEMPLATE_LOADERS." % loader)
No handlers could be found for logger "dajaxice"

我用谷歌搜索,但找不到这样的错误。

任何人都可以帮助为什么 python 安装不支持此 Templat_Loaders?

我的 python 版本是 2.7.3,使用 OS X v10.8

最佳答案

django.template.loaders.eggs.Loader 中的 .egg 资源加载器使用 pkg_resources来自 setuptools 的模块包如果可用。如果 pkg_resources 在您的系统上不可用,您将得到此异常。

setuptools 是独立于 Python 解释器的安装。

您应该按照 this link 中的说明安装 setuptools。 .

关于python - Dajaxice 的 django/python TEMPLATE_LOADER 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12961398/

相关文章:

python - 在 Windows 中单击 .lnk 时出现 Jupyter UTF-8 错误

html - 如何在html中显示Json数据到对话框

jquery - jquery的post()方法能够调用asp.net 3.5 webmethod吗?

javascript - grunt exec 卡住,期待来自 django collectstatic 的 0 状态代码

python - 导入错误: cannot import name 'OSCAR_MAIN_TEMPLATE_DIR'

python - 如何使用monkeypatching(PyTest)使用临时文件系统在python中模拟os.walk?

python - 买入更高价格时保持最低平均利润

python - 使用返回列表的 fixture 参数化 pytest 函数的最佳方法是什么?

javascript - 使用 Rails View 定期轮询数据库更新而不刷新

python - 在 Django 中实现 REST API 和 Web 界面