Hey guys, hope you are doing well 😁
Are you unable to download python modules using pip on your cmd or powershell terminal? There are two ways to solve the problem:
- Change your directory to your scripts folder where pip is stored and use pip OR
- Permanently solve the issue by adding the path to environment variables
Confused? Let me show you how it’s done:
I’ll be using the second option which is much better and feasible, but first we have to know where pip is stored
Step 1:
Let’s find out path to pip
First, we need to search for python in windows from the start menu and click on file location:
Then we get the folder where the shortcut to python is stored. So what we do next? We again open the file location of that shortcut:
Step 2:
Now we go to the scripts folder:
Copy the path which you can find above (as highlighted)
Step 3:
Now go to This PC(Win 10 &11)/My computer (Win 7) and right-click and go to properties
Now search in the search bar, and you can now click on the Edit the system environmental variables
:
Click on the environment variables
to continue
On the following window, select Path
from System variables
as highlighted and then click Edit
Now, Click New
(if you observed I’ve already added it in the first column, but I’ll show you again)
Now, enter the path:
Bam 💥 We have done it!
Let’s see pip works or not:
There you go! Easy peasy fix for pip.. Hope you liked it!