![](/img/trans.png)
[英]I'm getting the following error while using PyInstaller: OSError: [Errno 2] No such file or directory. I'm using Ubuntu 15.04 and Python 2.7
[英]I'm trying to install django=1.9 on ubuntu using python and I'm getting the following errors for admin login
在终端上显示的django错误:
Not Found: /favicon.ico [21/Apr/2017 07:33:24]
"GET /favicon.ico HTTP/1.1" 404 1963
Not Found: /favicon.ico [21/Apr/2017 07:33:25]
"GET /favicon.ico HTTP/1.1" 404 1963 [21/Apr/2017 07:34:23]
"GET /admin/ HTTP/1.1" 302 0
Internal Server Error: /admin/login/
Traceback (most recent call last):
File "/home/priya/.local/lib/python3.5/site-packages/django/template
/utils.py", line 65, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/priya/.local/lib/python3.5/site-
packages/django/template/backends/django.py", line 126, in
get_package_libraries
这是浏览器上显示的错误消息:
位于/ admin / login /的InvalidTemplateLibrary
Invalid template library specified. ImportError raised when trying to load
'django.templatetags.future': cannot import name 'RemovedInDjango110Warning'
Request Method: GET
Request URL: http://localhost:8000/admin/login/?next=/admin/
Django Version: 1.11
我已经安装了django = 1.9版本,显示为1.11
Exception Type: InvalidTemplateLibrary
Exception Value:
Invalid template library specified. ImportError raised when trying to load
'django.templatetags.future': cannot import name
'RemovedInDjango110Warning'
Exception Location: /home/priya/.local/lib/python3.5/site-
packages/django/template/backends/django.py in get_package_libraries,
line 130
Python Executable: /usr/bin/python3
Python Version: 3.5.2
Python Path:
['/home/priya/Desktop/project/project',
'/usr/lib/python35.zip',
'/usr/lib/python3.5',
'/usr/lib/python3.5/plat-i386-linux-gnu',
'/usr/lib/python3.5/lib-dynload',
'/home/priya/.local/lib/python3.5/site-packages',
'/usr/local/lib/python3.5/dist-packages',
'/usr/lib/python3/dist-packages']
django 1.9中的url
已从future
模板库中删除,因此,如果您尝试导入模板,例如: {% load url from future %}
,则会出现导入错误。 如果模板中需要url
,请使用它并删除导入。
https://docs.djangoproject.com/en/1.11/releases/1.9/#features-removed-in-1-9
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.