After getting to some point where I figured my small backup app was ready for a test, I wanted to build a Windows executable of some sort.
FWIW, the app (wpBG) is intended to backup my git repos by using git ‘bundles’, and it does the basic backup I expected when run from within Visual Studio Code.
Looking around, I found the PyInstaller project, as recommended by M. Driscoll in his book “Creating GUI applications with wxPython”.
After installing PyInstaller in the VSC terminal and running the build command
When I run the executable .\dist\wpBG\wpBG.exe either directly in the directory, from a DOS Shell, PS Shell or even from the VSC terminal, I get the same error:
PS D:\pkg\python\wpBG\dist\wpBG> .\wpBG.exe Traceback (most recent call last): File "wpBG.py", line 31, in <module> File "PyInstaller\loader\pyimod02_importers.py", line 391, in exec_module File "wpBgBackup.py", line 16, in <module> ModuleNotFoundError: No module named 'git'  Failed to execute script 'wpBG' due to unhandled exception! PS D:\pkg\python\wpBG\dist\wpBG>
Some searching for issues with PyInstaller, tells me to create a wpBG.spec file, but it gets overwritten every time I run the ‘build’ step. Nor does the information I found, really help to interpret the error message into something helpful
The code to support ‘git’ comes from: from git import Repo #pip install GitPython