我已经创建了一个在本地服务器上运行的flask应用程序。我需要使用pyinstaller将其转换为单个可执行文件。
我在Pycharm中运行了以下命令:
pyinstaller -w -F --add-data "templates;templates" --add-data "static;static" app.py
但是,我不断收到值错误,提示未找到app.py。我以为app.py是包含我的整个flask应用程序的可执行文件的新名称。因此,我不确定为什么会不断收到值错误。
以下是我的烧瓶应用程序的目录结构:
Form
- migrations
- venv
- - app
- - - static
- - - templates
- - - Bunch of .py files
- microform.py
- config.py
我尝试跑步
pyinstaller -w -F --add-data "templates;templates" --add-data "static;static" microform.py
但随后我得到一个错误提示:
Unable to find "C:\Users\test\PycharmProjects\Form\templates" when adding binary and data files.