What is PIP and How to Install It?

PIP is a system used by developers to install and manage packages written in Python. PIP can stand for Preferred Installer Program, or it can be a recursive acronym that means Pip Installs Packages. If you’re a budding web developer attracted to the fun and ease of Python, you’ll need to do two things to get started in your career: get great web hosting and learn to use PIP.

What should developers look for in a web hosting company?

As a newbie web developer, you’re going to be running through a lot of websites, and you’re going to need somewhere to store them. When you’re checking out web hosting companies, make sure you look for a company that has these features:

  • Reliable servers: You’re probably not going to start out with dedicated server hosting, which is our premium hosting package, but even if you’re just choosing shared hosting, you’re going to want to make sure those servers are fast, reliable and secure. Don’t choose a web hosting company that offers less than 99.9% uptime.
  • Great customer support: If something goes wrong, you’ll rest easy knowing that you can quickly get in touch with somebody who can walk you through it. Choose a web hosting company that offers 24/7 customer support.
  • Lots of hosting packages to choose from: Scalability is the name of the game. Soon, you’re going to be outgrowing the shared hosting packages you start out with. When that happens, you’ll want to know your web hosting company can still support you.

What’s PHP?

PHP is a recursive acronym that stands for PHP: Hypertext Preprocessor. It’s a popular open source general-purpose scripting language that’s great for web development because it can be embedded into HTML.

PHP is different from client-side languages like JavaScript because the code is executed on the server, which generates HTML, which is then sent to the client. So, the client will see the results of running the script but won’t be able to see the underpinning code. PHP is super simple for newbie developers to learn, yet it offers advanced features that are valuable even to professional programmers.

How to install PIP

STEP 1: Check to see if Python is properly installed

You can’t use PIP unless you’ve installed Python.

To check, do this:

  1. Open the Command Prompt window
  2. Type this command: python

If Python responds, then Python is installed! If you don’t have Python, you’ll see an error message that the program could not be found. If this happens, install Python, so you can install PIP.

(Or just install a version of Python that already comes equipped with PIP.)

STEP 2: Check to see if PIP is already installed

PIP comes automatically installed with Python 2.7.9+ and Python 3.4+, as well as the virtual environments virtualenv and pyvenv. So, before you install PIP on Windows, check if it’s already installed.

To check, you only need to do two things:

  1. Open the Command Prompt window
  2. Type this command: pip help

If PIP responds, then PIP is installed! If you don’t have PIP, you’ll see an error message that the program couldn’t be found.

If that happens, you can follow the rest of this tutorial.

How to install PIP on Windows

Assuming you’ve already installed Python, here’s how you install PIP on Windows.

STEP 1: Download get-pip.py

Download the get-pip.py file to the desired Windows folder. You can save it anywhere you want. (Just don’t get so creative with the folder name that you can’t remember it later.)

STEP 2: Launch Windows Command Line

Because PIP is a command-line program, when you install it, the PIP command is automatically added to your computer. Here’s how you launch the Command Prompt window:

  1. Press Windows key + X
  2. Click Run
  3. Type exe
  4. Press Enter

If, at any time in this process, you get an error message that you don’t have the necessary permissions to do something, it means you need to open the app as admin. To do this, right-click Command Prompt and click Run as. When prompted, enter your administrator info.

STEP 3: Install Python using get-pip.py

In the Command Prompt window, type: python get-pip.py

The PIP installation process should start. If the file can’t be found, double-check where you saved the file by using the dir command. (This shows you a full listing of the contents of a directory.)

STEP 4: Check the PIP version

In the Command Prompt window, type: pip –version

This command will show you the current version of PIP.

STEP 5: Verify that you’ve installed it correctly

When you install PIP, you can verify the installation by typing the following: pip help

If PIP has been correctly installed, the program will run. If you get an error message, try to install PIP again.

STEP 6: Configure PIP

In Windows, the PIP configuration file is %HOME%\pip\pip.ini

You can also find a legacy per-user config file at %APPDATA%\pip\pip.ini

If you want to set a custom path location for this config file, use the environment variable PIP_CONFIG_FILE.

What if you want to install PIP3?

To install PIP3, download the 64-bit installer for Python 3.6.5 by clicking here.

When you’re prompted to, click the checkbox beside Add Python 3.x to PATH.

When you click the checkbox, the folder containing python3 and pip3 will be added to the path, which is a list of folders searched by the Windows terminal cmd.exe. After this, it will be easy to run pip3 commands from the terminal.

After you install pip3, verify by launching a terminal and entering the following command: python

If Python3 is installed, the program should run.

Configuring PIP3

With your cursor in a console window, type the following, then press Enter: pip3 install –user pybin

Then run python3 -m pybin

If your path is correctly configured, it will tell you.

If it instead gives you a report like “The user bin directory ‘/home/cefn/.local/bin’ is not in PATH, type the following, then press enter: python3 -m pybin put

Congrats! You’ve now successfully installed PIP (or PIP3). Welcome to the wonderful world of Python.

If you liked this article, we have a feeling you’ll also like our guides to 5 programming languages web developers need and php error messages web designers should know about.