
Now download the get-pip.py script with the following curl command: If that’s the case, install it.Īt this point, Python 2 is installed on your machine and you’re ready to install pip for Python 2. Next, update the package index with the update command:Ĭhances are you don’t have Python 2 installed on your Ubuntu machine.

Let’s start the process by enabling the universal repository with the following command: To work around this, we’ll use the get-pip.py script. Installing pip for Python 2 is a slightly longer process because Ubuntu 20.04 doesn’t come with pip for Python 2. Pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) Install pip for Python 2 For this, in the terminal, run the following commandĭuring our test run, we got the following output.

A simple way of doing this is to find out the version of the pip installed on the system. It is important to verify that pip is installed properly. Once the command finishes, use the following command to install pip for Python 3:ĭuring the installation process, the command will also download and install the dependencies required for using and building the libraries. In the terminal, start with the update command for the package manager. Install pip For Python 3īefore starting the process, make sure you’re logged in as the root user. You need an Ubuntu 20.04 instance and a user with sudo privileges.

In this comprehensive guide, we’ll go into the basics of installing pip for both Python 2 and Python 3 on Ubuntu 20.04. Using pip, you can search and install packages from the package indexes, mainly from the Python Package Index (PyPI).ĭuring this process, pip downloads your desired package and installs it and any dependencies that are needed to make the package work. If you have ever used Python, you know that you need to install various libraries and packages using pip, the native package manager.
