The Python packages installer is Pip. Installing packages from the Python Package Index (PPI) can be done with pip. I will walk you through the process of installing pip on Ubuntu 20.04 in this tutorial.
Pip Installation on Ubuntu 20.04
Python3 is included by default in Ubuntu 20.04. Make sure that Python is already installed before installing pip. If Python3 is not already installed, learn how to install it on Ubuntu.
To check the Python version use following command.
$ python3 -V Output Python 3.8.5
The system already has Python3 installed.
installation on Ubuntu 20.04 using apt
$ sudo apt install python3-pip
Check the installation using the following command after it has finished:
$ pip3 --version Output should look like pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
How to use Pip with basic commands example.
Let’s discuss how to use pip with basic commands.
Installing a package with pip.
Pip packages can be installed in two ways. It can be installed for the user who is currently logged in or for the entire system.
$ pip3 install --user python_package_name
If the –user option is removed, the package will be installed across the entire system and accessible to all users. In this case, sudo access is required.
$ sudo pip3 install python_package_name
Search for packages using pip.
Use the following command to search packages in the Python Package Index.
$ pip3 search search_string
How to remove packages installed via Pip.
Use the following command to remove the packages using pip.
$ pip3 uninstall installed_package_name
We have successfully Installing Pip on Ubuntu 20.04 Kindly report in case you are facing difficulties with following details.
- OS name
- OS version
- Package name
- Logs – Error / Warning / failed