ImportError:没有名为sekizai的模块

时间:2015-01-10 07:20:49

标签: django

我已根据文档安装了所有三个依赖项 (Python 2.6,2.7,3.2或更高版本。 Django 1.2.7或更高版本。 django-classy-tags 0.3.1或更高版本) 但是当我将'sekizai'添加到我的INSTALLED_APPS设置中并执行“manage.py runserver”时,它会向我报告“ImportError:没有名为sekizai的模块”。

我在settings.py中的内容:

    # Application definition

    INSTALLED_APPS = (
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
        'mptt',
        'hw',
        'useraccess',
        'proxy',
        'compressor',
        'sekizai',
    )

    MIDDLEWARE_CLASSES = (
        'django.contrib.sessions.middleware.SessionMiddleware',
        'django.middleware.common.CommonMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.contrib.auth.middleware.AuthenticationMiddleware',
        'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
        'django.contrib.messages.middleware.MessageMiddleware',
        'useraccess.middleware.VisitCollectMiddleware',
        'django.middleware.clickjacking.XFrameOptionsMiddleware',

    )

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.contrib.auth.context_processors.auth',
    'django.core.context_processors.i18n',
    'django.core.context_processors.request',
    'django.core.context_processors.media',
    'django.core.context_processors.static',
    'hw.context_processors.user_info',
    'hw.context_processors.login_form',
    'hw.context_processors.get_all_user',
    'sekizai.context_processors.sekizai',
)

2 个答案:

答案 0 :(得分:4)

只是做

pip install https://pypi.python.org/packages/source/d/django-sekizai/django-sekizai-0.8.1.tar.gz

你应该没事。

答案 1 :(得分:0)

答案于 2021 年 7 月 10 日更新

pip install django
pip install django-cms
pip install django-sekizai

pip freeze

asgiref==3.4.1
Django==3.2.5
django-classy-tags==2.0.0
django-cms==3.9.0
django-formtools==2.3
django-sekizai==2.0.0
django-treebeard==4.5.1
djangocms-admin-style==2.0.2
pytz==2021.1
sqlparse==0.4.1