How to install pip3 on Ubuntu

1. Check whether pip3 is installed on the system

First, we need to check whether pip3 is already installed in the system. To do this we can run the following command:

pip3 --version

If your system has pip3 installed, you will see output similar to:

pip 19.0.3 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)

Otherwise, you will see an error message indicating that pip3 is not installed.

2. Update the software package index

Before installing pip3, we need to ensure that the package index in the system is up to date. To do this we can run the following command:

sudo apt-get update

This command will update the list of packages on the system. This may take some time, depending on your system speed and available updates.

3. Install pip3

After updating the package index, we can use the following command to install pip3 in the Ubuntu system:

sudo apt-get install python3-pip

This command will download and install pip3. If the corresponding dependency packages have been installed in the system, the download speed will be very fast, otherwise it may take some time.

4. Check whether pip3 is installed successfully

Still need to verify that pip3 was installed successfully. To do this we can still run the following command:

pip3 --version

If pip3 is installed correctly on your system, you will see output similar to:

pip 19.0.3 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)

Guess you like

Origin blog.csdn.net/djklsajdklsajdlk/article/details/134770240