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

How to Install Pip on Ubuntu 18.04

This guide shows you how to install pip on Ubuntu 18.04. Pip lets you add Python packages with one short command. You need root access, so it suits VPS and dedicated server customers.

Web Hosting1 min read5 steps

What is pip?

Python is a popular programming language. A package is a ready-made piece of code that other people wrote. Pip is the tool that fetches those packages and installs them. It works like a delivery service for code.

Before you start

  • You need a server with Ubuntu 18.04.
  • You need root access or a user that can run sudo. Sudo means "run this command with admin power".
  • You need an SSH client. SSH is a safe way to type commands on a faraway server. Your welcome email has your login details.

Steps

  1. Log in to your server with SSH.
  2. Refresh the software list:
    sudo apt update
    This command asks Ubuntu for the newest list of software it can install.
  3. Install pip for Python 3:
    sudo apt install python3-pip
    This command downloads pip and its helper files. Type y when it asks to continue.
  4. Check the version:
    pip3 --version
    This command shows which pip you have. A version number means it worked.
  5. Install a test package:
    pip3 install requests
    This command installs a package named requests.

Useful pip commands

CommandWhat it does
pip3 listShows installed packages
pip3 install nameInstalls a package
pip3 uninstall nameRemoves a package
pip3 install --upgrade nameUpdates a package

If something goes wrong

  • If you see "E: Unable to locate package", run sudo apt update again.
  • If you see "Permission denied", put sudo at the front of the command.
  • If the server cannot download anything, check that it is online. Then ask Hostvento support for help.
Tip: Ubuntu 18.04 is an older release. Newer Ubuntu versions use very similar commands.

Quick recap

  • Pip installs Python packages.
  • Run sudo apt update first.
  • Install with sudo apt install python3-pip.
  • Confirm with pip3 --version.