Resolved: pip is not recognized as an internal or external command
Issue Description
Python pip commands gives below error in CLI or powershell,
‘pip’ is not recognized as an internal or external command,
operable program or batch file.
Resolution
The issue seems to be due to the missing path required to configure for using Python pip commands from CLI/Commands prompt or Powershell.
The issue can be fixed easily using below steps,
Steps:
- Find out the pip.exe location path on your machine. pip exe can be found in the scripts folder where python exe will be located.
2. Either way, if you obtain the path of the pip.exe, please copy the path and add it to the PATH variable as new Environment Variable.
For most of you, the default location for PIP would be located in the script’s location where your Python exe exists in the parent path. please check and confirm your location,
Example
“C:\Python37\Scripts”
or
“C:\Python27\Scripts”
or
%USERPROFILE%\AppData\Local\Programs\Python\Pythonxx_xx\Scripts
or
On a Windows machine with Visual Studio installed, a path can be found below,
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\scripts\
After the above updates, You shall see Python commands are available and accessible from anywhere in the Machine.
From Command Prompt CLI
From Powershell
References:
That’s all! Happy coding!
Does this help you fix your issue?
Do you have any better solutions or suggestions? Please sound off your comments below.
Please bookmark this page and share it with your friends. Please Subscribe to the blog to receive notifications on freshly published(2024) best practices and guidelines for software design and development.