django 1.0.4中没有名为django.template的模块

时间:2017-07-31 15:18:08

标签: python django templates environment-variables virtualenv

我在django 1.0.4中使用旧项目,使用python 2.7进行viertualenv。 当我尝试我的一个脚本时,我在这个地方发现了一个错误:

from django.template import Context, loader

错误:

Traceback (most recent call last): File "path to file.py", line 6, in from django.template import Context, loader ImportError: No module named django.template

有人有这样的错误吗?

修改

安装:

Collecting https://www.djangoproject.com/download/1.0.4/tarball/
  Downloading https://www.djangoproject.com/download/1.0.4/tarball/ (5.1MB)
    100% |████████████████████████████████| 5.1MB 332kB/s 
  Cannot determine compression type for file /tmp/pip-KiWjIE-unpack/tarball.obj
Installing collected packages: Django
  Running setup.py install for Django ... done
Successfully installed Django-1.0.4

Requriments:

appdirs==1.4.3
Django==1.0.4
MySQL-python==1.2.3
olefile==0.44
packaging==16.8
Pillow==4.1.1
pkg-resources==0.0.0
pyparsing==2.2.0
python-memcached==1.58
six==1.10.0

我也遇到错误:from django.core.management import setup_environ

0 个答案:

没有答案