0

I have created a flask application using python that has template folder, static folder and multiple .py files, I want to convert the entire application into an executable package or something similar that can be executed with a click. I tried working with pyinstaller and also changed the .spec file to include the template and the static folder. Yet after converting to exe, the output on the web browser is template not found.

This is inside the .spec file inside the a = Analysis(

datas= collect_data_files('flask') + [
        ('esof_scanner/templates', 'templates'),
        ('esof_scanner/static', 'static')
    ],

What are the best way to convert a flask application into an exe, how do you run a python file or an python file converted into an exe file without showing the command prompt

I have tried default pyinstaller, that is without changing the .spec file I have also tried by changing the .spec file I have also removed my application's dependency on socketio

  • Have you looked at https://stackoverflow.com/questions/7674790/bundling-data-files-with-pyinstaller-onefile? – AKX May 31 '23 at 12:32

0 Answers0