Pyinstaller Jinja2 TemplateNotFound

后端 未结 2 1781
面向向阳花
面向向阳花 2021-01-11 20:42

I am using pyinstaller to build my flask application, everything is working fine except I get problems with Jinja2 templates.

It gave me jinja2.ex

2条回答
  •  佛祖请我去吃肉
    2021-01-11 20:55

    The Jinja2 package uses the pkg_resources API which is not supported by PyInstaller. The pkg_resources module is provided via the setuptools package.

    From the FAQ page of pyinstaller:

    pkg_resources is currently not supported by PyInstaller. This means that an application using a library which uses the the pkg_resources API will probably not work out of the box. The only situation in which it works is when it's being used on .egg files (see above). For details follow issue #183.

提交回复
热议问题