1

I was able to install pyinstaller and when I typed pyinstaller --onefile --windowed frontend.py I got this error:

pyinstaller : The term 'pyinstaller' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
included, verify that the path is correct and try again.
At line:1 char:1
+ pyinstaller --onefile --windowed frontend.py
+ ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (pyinstaller:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

How to fix this error?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
  • Are you using a virtual environment (conda, pipenv etc.)? if not - create and environment and the rerun your code – skibee Nov 08 '20 at 07:07

2 Answers2

3

pyinstaller should be in the PATH environment variable.

  • First find the full path of pyinstaller.exe (It should be in the Scripts directory of your Python installation) and copy the full path.

  • Then open a Command Prompt (As Administrator)

  • Then run the Command setx PATH "%PATH%;PYINSTALLER_PATH" where PYINSTALLER_PATH is the full path of pyinstaller you have copied.

  • Then you need to re-launch Command Prompt and run the command again.

Wasif
  • 14,755
  • 3
  • 14
  • 34
0

it means PyInstaller don't installed try : [] - open Console/Shell/Terminal and write under command

pip install pyinstaller