I solved this problem with the following code in the command prompt:
C:\APPS>python -m PyInstaller --onefile -w Prog1.py