In this article, I will be sharing with you how to solve one of the most annoying problems, python coders have to suffer from- "PIP is not recognized"
PIP or Python Index project is a package which is used to install modules in python which don't come along with the python standard library. It comes pre- installed when you download python. It opens the doors to thousands of python modules which come in handy for a variety of problems. It performs various useful functions just using the terminal. These include: upgrading installed modules , installing new modules , deleting modules and much more. However , there is a very annoying problem associated with it which harasses python coders :
PIP is not recognized as an external or internal command,cmdlet, function, script file, operable program or batch file
How to solve it?
1st method (easy)
Follow the given steps:-
- Uninstall the version of python, you are using by going to This PC-> Uninstall or change a program-> Python 3x
- Go to official python website.
- Install the latest version of python according to your operating system from the Downloads menu.
- Then install it and you are good to go!!
- If you want to check, open powershell and type 'pip' , you shouldn't see that irritating error again.
- Happy Coding!
2nd Method (difficult)
- Locate where you have installed python. This is a very hard task as usually python is always hidden somewhere.
- On Windows, it is generally located in C:-> Users->UserName->AppData->Roaming->Python->Python39
- On many computers AppData is hidden by default. To make it show , select the 'Hidden Items' checkbox in the View menu in the UserName page.
- Open the Scripts subfolder inside the Python folder.
- Copy its path.
- Go to This PC-> System Properties-> Advanced System Settings-> Environment Variables-> Path-> Edit-> New
- Paste the copied path there.
- Click on OK thrice as the dialog boxes close one by one
- you are good to go!!
- If you want to check, open powershell and type 'pip' , you shouldn't see that irritating error again.
- Happy Coding!