Python: Difference between revisions

From Smithnet Wiki
Jump to navigation Jump to search
Line 8: Line 8:
  pip install pyinstaller
  pip install pyinstaller


Add C:\Users\<user>\AppData\Roaming\Python\Python311\Scripts to PATH:
Add C:\Users\<user>\AppData\Roaming\Python\Python312\Scripts to PATH:


  pyinstaller --onefile file.py
  pyinstaller --onefile file.py
and the resultant executable will be in the dist directory.

Revision as of 17:55, 12 January 2024

PIP

On Windows, start pip with:

py -m pip

Python Installer

pip install pyinstaller

Add C:\Users\<user>\AppData\Roaming\Python\Python312\Scripts to PATH:

pyinstaller --onefile file.py

and the resultant executable will be in the dist directory.