Tested with Python 3.10
and PyInstaller 4.7
See also: pyinstaller-setuptools GitHub
Desired package/program is called: alpha.exe
git clone https://example.com/user/alpha
python -m venv alpha
cd alpha
scripts\activate
pip list
python.exe -m pip install --upgrade pip
pip install wheel
# edit requirements.txt and append: pyinstaller
# if there is no requirements.txt file, then edit 'install_requires' section of setup.py
pip install -r .\requirements.txt
pip install pyinstaller-setuptools
# edit setup.py (see below)
python .\setup.py build
python .\setup.py install
python .\setup.py pyinstaller -- -F --noupx
cd dist
dir
# you should now see: alpha.exe
Use this:
from pyinstaller_setuptools import setup
from setuptools import find_packages
Instead of this:
from setuptools import setup, find_packages