Using PyInstaller



examples/package/hello_world.py
print("hello world")

pip install pyinstaller
pyinstaller myscript.py
pyinstaller --onefile hello_world.py