Pyinstaller is not recognized as internal or external command

Solution 1:

You have to modify your User PATH environment variable to include C:\Users\[USERNAME]\AppData\Local\Programs\Python\Python36-32\Scripts.

For how to add/modify your PATH environment variables, see this.

Solution 2:

Copy 'pyinstaller.exe' to the folder you have the .py file you want to convert. When you are done, just delete 'pyinstaller.exe'. Good luck.

Solution 3:

For Python 3.7, you will have to add the Scripts folder from AppData/Roaming (%appdata%) to the PATH variable.

C:\Users\%USERNAME%\AppData\Roaming\Python\Python37\Scripts

Solution 4:

I did correctly configured my script path, I had to run python -m PyInstaller script.py in order for it to work

For every script I have to follow this pattern, python -m [scriptname] [args]

python version 3.10.0

Solution 5:

This solution work for Python 3.9

First of all find the pyinstaller.exe location. To do this you could try this trick: (do not press 'y' just look at the above copy the path what you are looking for)

pip uninstall pyinstaller

Before typing anything, it will show you the path where the pyinstaller.exe is. After that copy the location and run this command on terminal: (it is an example)

python C:\Users\[YOUR_USER_NAME]\AppData\...Scripts\pyinstaller.exe --onefile [your_script_name.py]