pybbm错误网址.py

2024-09-28 22:22:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚在安装pybbm并运行服务器后遇到这个错误

File "/Users/nathann/code/ipals/env/lib/python2.7/site-packages/pybb/urls.py", line 4, in <module>
    from django.conf.urls.defaults import *
ImportError: No module named defaults

我不知道该怎么处理它,因为它是pybb的一部分,而不是我的代码。在

这是我的pip freeze

^{pr2}$

Tags: 服务器envlib错误sitecodeurlsusers
1条回答
网友
1楼 · 发布于 2024-09-28 22:22:18

这是因为您使用的是django1.6.3。根据Django 1.4 changelog

Until Django 1.3, the functions include(), patterns() and url() plus handler404, handler500 were located in a django.conf.urls.defaults module.

In Django 1.4, they live in django.conf.urls.

换句话说,您需要将pybbm升级到最新版本:

pip install  upgrade pybbm

相关问题 更多 >