frndmg / pyinstaller-use-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyInstaller usage example

Run

poetry env use 3.8  # whatever python version you want
poetry install -E installer

The first time you will not have the app.spec, pyinstaller will add one for you when you run

poetry run pyinstaller -F -p . --name app app/__main__.py

You can remove the pathex argument as long as the .spec file is in the root of your project.

After that, you can simply use

poetry run pyinstaller app.spec

This will create an standalone executable in dist/app

Run

$ ./dist/app
output of my executable: cool string

About


Languages

Language:Python 100.0%