Summary: Download get-pip.py file in the desired folder ➨ Open command prompt and navigate to the location of the downloaded file and install PIP using the following command :
pip is a package management tool in Python that allows us to install and manage external Python libraries and dependencies that are not a part of the standard Python library. In other words, it is a utility that allows us to manage PyPI package installations from the command line.
- pip is an acronym for “Pip Installs Packages” or “Pip Installs Python“. Alternatively, it also stands for “preferred installer program”.
- The Good News: Python 2.7. 9 and later (on the Python2 versions), and Python 3.4 and later (on Python3 versions) are shipped with pip by default. This allows newbies to access the community libraries without having to face the difficulty of setup.
Before installing pip on Windows, we must check if it is already installed in our system. Since pip is a Python utility it requires an active Python installation.
If Python responds with its version and a list of commands as shown below, then it means that Python is installed correctly on your system.
You must install Python before installing pip, in case the command is unrecognized. Once you install python on your system, please move on to the next step.
◈ Step 2: Command to verify if PIP pre-exists on your system.
You can verify if pip is installed on your system using the following command:
If pip already exists on your system, you will get the following list of Commands and General Options as displayed the image below.
If PIP doesn’t pre-exist on your system, you will get an error message as shown below.
Now, if you got the above error message, then you have to install pip on your Windows system using the procedure given below.
Installing PIP On Windows
◈ Step 1: Download PIP
The first and foremost requirement to be able to install PIP on Windows is to download the get-pip.py file to a folder on your system. You can download the get-pip.py file from the link given below.
You can also use the curl command to download PIP. Use the command given below to download PIP using curl.
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
For older versions of Python, you can use the following link: papaya.org
You might have to launch Windows Command Prompt in Administrator mode so that you can properly install PIP on your system. Let us have a look at the steps to launch Command Prompt on your system.
✨ Press Windows Key + X on your keyboard.
✨ Click on Run on the menu that appears on the screen.
✨ Type cmd.exe in the Run Dialog Box
Alternatively, you can type cmd in the Windows search bar and click on the command prompt icon. To open the command prompt in Administrator mode Right-click on the Command Prompt icon and click on Run as administrator.
◈ Step 2: Installing PIP
Once you have opened command prompt, navigate to the the location/folder where you downloaded and saved the get-pip.py file. Use the command given below to install PIP.
The installation should begin as soon as you type the above command, provided you have specified the correct path/location of the get-pip.py file.
◈ Step 3: Adding PIP To The Windows Environment Variables
You might face problems even after successfully installing PIP. This is because Python is unable to find the tool you are trying to launch in the current directory. Hence, you have to navigate to the directory/location where you installed the tool every time you want run the command to launch it. But, this is problematic and you would want to be able to run it from any location.
To ensure that you can run PIP from any desired location, you have to add the directory path where PIP is installed as a PATH Environment Variable in Windows. Follow the steps given below to add PIP to windows environment variable:
- Open Control Panel ➨ Navigate to System and Security ➨ System
- Click on the Advanced system settings.
- Click Environment Variables.
- Double click the variable PATH under System Variables.
- Click on New ➨ add the location of the directory where pip is installed ➨ select OK.
◈ Step 4: Verifying The PIP Installation
To verify if PIP was successfully installed on the system use the
pip help command on the command prompt as mentioned earlier in this article.
You can also verify the version of PIP installed on your system using the following command.
❖ Upgrading PIP
If there is an upgraded PIP version released then you may have to upgrade the version of PIP installed on your system. You can upgrade the version of PIP on Windows, using the following command in the command prompt.
python -m pip install --upgrade pip
❖ Downgrading PIP
In case the newer PIP version starts to misbehave and produces undesirable results because of compatibility issues then you might want to downgrade and move back to the older version of PIP. You can downgrade the version of PIP on Windows, using the following command in the command prompt.
python -m pip install pip==18.0
In this article you learned:
- How to install PIP on Windows?
- How to verify if PIP is preinstalled or if PIP has been successfully installed?
- How to add PIP path to windows environment variable?
- How to upgrade and downgrade PIP?
With that, we come to the end of this short article and I hope you will not face any difficulty while installing PIP on your Windows system after reading this article. Please stay tuned and subscribe for more interesting articles.
Where to Go From Here?
Enough theory. Let’s get some practice!
Coders get paid six figures and more because they can solve problems more effectively using machine intelligence and automation.
To become more successful in coding, solve more real problems for real people. That’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?
You build high-value coding skills by working on practical coding projects!
Do you want to stop learning with toy projects and focus on practical code projects that earn you money and solve real problems for people?
🚀 If your answer is YES!, consider becoming a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.
If you just want to learn about the freelancing opportunity, feel free to watch my free webinar “How to Build Your High-Income Skill Python” and learn how I grew my coding business online and how you can, too—from the comfort of your own home.