我正在使用pyinstaller从Django项目生成可执行文件。当我运行脚本生成可执行文件时,但当我从cmd运行EXE时,它显示如下错误:
错误:
Django version 1.9.13, using settings 'mysite.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
static
C:\Dev\EXE\cookie\dist\mysite\media
http
('Unexpected error:', <class 'django.template.exceptions.TemplateDoesNotExist'>
Traceback (most recent call last):
File "crumbs_mysite\views.py", line 278, in parser
File "crumbs_mysite\views.py", line 146, in licensevalidation
File "site-packages\django\shortcuts.py", line 39, in render_to_response
File "site-packages\django\template\loader.py", line 96, in render_to_string
File "site-packages\django\template\loader.py", line 43, in get_template
django.template.exceptions.TemplateDoesNotExist: activate_license.html
Traceback (most recent call last):
File "crumbs_mysite\views.py", line 278, in parser
File "crumbs_mysiite\views.py", line 146, in licensevalidation
File "site-packages\django\shortcuts.py", line 39, in render_to_response
File "site-packages\django\template\loader.py", line 96, in render_to_string
File "site-packages\django\template\loader.py", line 43, in get_template
django.template.exceptions.TemplateDoesNotExist: activate_license.html
[20/Dec/2017 10:21:09] "GET / HTTP/1.1" 500 27
答案 0 :(得分:0)
我建议在pyinstaller上发布这个。您是否尝试通过spec文件手动添加Django库?