Install pip3 for Python 3 on Ubuntu
The PyPA
recommended tool for installing Python packages.
1. Install pip3
for Python 3
On Ubuntu 17.10, pip3
is not installed by default. Python 3.6.3 is installed. So let’s install pip3
for Python 3 first.
You can check the version of Python 3 that is installed on your Ubuntu operating system with the following command:
python3 --version
Before you try to install anything new on Ubuntu operating system, run the following command to update the package repository cache of Ubuntu:
sudo apt-get update
To install pip3
for Python3 on Ubuntu, run the following command:
sudo apt-get install python3-pip
Now press y
and then press Enter
to continue. It should take a while to download and install all these new packages depending on your internet connection.
Once the installation is complete, you can check the version of pip3
for Python 3 using the following command:
pip3 --version
You can see that, the version of pip3
. According to the official website of pip3
, this is the latest version as of this writing.
2. Updating pip3
for Python 3
Open a terminal and run the following command to update pip3
for Python 3:
pip3 install -U pip
As you can see pip3
for Python 3 has been updated.
Now to check the version of pip3
for Python 3, run the following command:
pip3 --version
The command said pip3
was installed in /usr/lib/python3/dist-packages
directory.
References
[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/
[2] Install PIP on Ubuntu 17.10, https://linuxhint.com/install-pip-on-ubuntu17/