Python is one of the versatile programming languages that can help programmers design web applications and website pages. Beginners are learning Python to follow the footstep of professional programmers. When you are working on a Python project, you may encounter the error “Issue: ‘pyinstaller’ is not recognized as an internal or external command operable program or batch file”.
Long error code, right? No need to get panicked as there is no such error that can’t be solved. In this article, we are going to provide you with quick solutions that can help you make the error warning go away. Let’s have a look at the error warning
How error “Issue: ‘pyinstaller’ is not recognized as an internal or external command operable program or batch file” occurs
As the error signifies, the cause of the warning is the use of pyinstaller. This is how you get the error warning
'pyinstaller' is not recognized as an internal or external command, operable program or batch file.
Now, figure out the solutions to fix the error
Solutions to fix the error warning
Determine the path of the pyinstaller
To solve the error, this solution can really fix the issue warning. You need to determine the path of the pyinstaller. For this, you can go ahead with the following code
pip uninstall pyinstaller
with this, you will know the confirmation of whether you want to remove the below file or not
c:\users\USERNAME\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\scripts\pyinstaller.exe
Now you are aware of the path of the pyinstaller. To exit the uninstallation, type ‘NO’ as you achieve the goal of finding the path of the pyinstaller. You just need to add the above path to the path variable.
c:\users\USERNAME\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\scripts\
Add Python code in the path
Follow the below steps to resolve the error by adding python code to the path
- In search, check for the Advanced system settings
- Next is to navigate to the Environment variables. Go to Edit, click New if there is no path environment that exists.
- Open the Edit System Variable or New System Variable, then click the button named New system variable.
- Add this path in the path variable:
c:\users\USERNAME\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\scripts\
- Click Ok and close all the windows.
- Open the command prompt window again and execute the pyinstaller command.
Adjust path environment variable
Another way to fix the error “Issue: ‘pyinstaller’ is not recognized as an internal or external command operable program or batch file”. You just need to adjust the environment variable of the path. Follow
C:\Users\[USERNAME]\AppData\Local\Programs\Python\Python36-32\Scripts
With this, you can find the executables. If you are using Solaris and Linux, use the shell’s startup file to set the Path system Variable. Use system utility in windows on the control panel. Change the system path variable is not needed when you are using Mac or Windows operating system
Conclusion
Here you get the complete information and solutions to fix “Issue: ‘pyinstaller’ is not recognized as an internal or external command operable program or batch file”. Hope it helps you fix the error!
Reference Source: https://dtuto.com/questions/7368/lsquo-pyinstaller-rsquo-is-not-recognized-as-an-internal-or-external-command-operable-program-or-batch-file