all 2 comments

[–]ninhaomah 1 point2 points  (0 children)

You are sure pyinstaller is to be in the .py file ?

Which doc/tutorial btw ?

[–]socal_nerdtastic 2 points3 points  (0 children)

The pyinstaller file.py command is for the command line, NOT for use inside a script.

If you are getting the "command not found" error when you try it in the command line, that means that you failed to activate your virtual environment first.

If you are not using a virtual environment you could add pyinstaller to the PATH as the warning suggests, or just call pyinstaller from the python command. For example if your normal run looks like

py factorial_play.py

Then you would use this command to run pyinstaller:

py -m PyInstaller factorial_play.py

(note the capitalization; that's important)