Pyinstaller is not working on my laptop

PS F:\Hussain Phoopha Laptop data\VU - MCS\CS619\Final Application> pyinstaller --onefile
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
  •   + CategoryInfo          : ObjectNotFound: (pyinstaller:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

above statement is generated please help me in this regard

If you are on a Windows machine, the pyinstaller command is likely not on your system’s enviornment path. Windows does not know where the actual pyinstaller executable is to run the command above.

Assuming you are using a global Python environment, and that is where you have installed the pyinstaller module, you could do something like this in the short-term:
python -m pyinstaller --onefile

The -m flag tells Python you want to run a module directly. It is a way to sidestep some Path issues in a system. Python virtual environments may help you manage some of these path issues:

If you are indeed on Windows, you may need to update your Windows environment variables.
If the command is not found, make sure the execution path includes the proper directory:

  • Windows: C:\PythonXY\Scripts where XY stands for the major and minor Python version number, for example C:\Python38\Scripts for Python 3.8)
  • GNU/Linux: /usr/bin/
  • macOS (using the default Apple-supplied Python) /usr/bin
  • macOS (using Python installed by homebrew) /usr/local/bin
  • macOS (using Python installed by macports) /opt/local/bin