I need to create an executable file from multiple python files and I chose to go with pyinstaller. I installed it with pip install pyinstaller
. But when I executed the command of pyinstaller --onefile Main.py
, I got the following error:
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
I checked this page for the solution to this problem and tried out the following options but none of them could solve the issue:
- Added python scripts folder to env path.
- Uninstalled and reinstalled pyinstaller
- Copied pyinstaller.exe and pyinstaller-script.py to project directory.
The third option did give some progress but I still couldn't get it to work. I copied the pyinstaller.exe and pyinstaller-script.py to the location of my python files location. Running the pyinstaller command again gave me the following error:
Unable to create process using 'D:\Projects\FSS\python.exe "D:\Projects\FSS\FSS Mini PC Application\pyinstaller-script.py" --onefile -w Main.py'
My user environment variables are as follows:
My system environment variables are as follows:
I am stuck on this problem and would appreciate some help.