Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Install Pip on Ubuntu 16.04 LTS

This guide shows you how to install pip, the Python package installer, on a server running Ubuntu 16.04 LTS. You need root access, so it suits VPS and dedicated server customers.

Web Hosting2 min read5 steps

What is pip?

Python is a programming language. Many websites and tools are written in it. Pip is a helper program for Python. It downloads and installs add-on code, called packages, for you. Think of it as an app store that works from the command line.

The command line is a screen where you type commands instead of clicking. On a server, you reach it with an SSH client. SSH is a safe way to control a server from far away.

Before you start

  • You need root access, or a user that can use sudo. Sudo means "run this as the boss user".
  • You need to log in to your server with SSH. Your welcome email has the login details. You can also ask Hostvento support.

Steps

  1. Log in to your server with SSH.
  2. Update the list of available software:
    sudo apt-get update
    This command refreshes the list of packages that Ubuntu can install.
  3. Install pip for Python 3:
    sudo apt-get install python3-pip
    This command downloads pip and sets it up. Type y and press Enter if it asks you to confirm.
  4. If you want pip for Python 2, run this instead:
    sudo apt-get install python-pip
  5. Check that pip is installed:
    pip3 --version
    This command prints the pip version number. If you see a number, pip works.

Install your first package

Try a small package to test pip. This one is called requests. It helps Python programs talk to websites.

pip3 install requests

This command downloads the package. To remove it later, run pip3 uninstall requests.

Common problems

  • Command not found: Run the update command again, then retry the install step.
  • Permission denied: Add sudo at the start of the command.
  • Old pip warning: Pip may say a newer version exists. You can ignore it for basic use.
Tip: Ubuntu 16.04 is an old release. Newer Ubuntu versions use almost the same commands, so this guide will still help you there.

Quick recap

  • Pip installs Python packages for you.
  • Log in with SSH and run sudo apt-get update.
  • Install it with sudo apt-get install python3-pip.
  • Check it with pip3 --version.
  • Ask Hostvento support if you cannot reach your server.