![](https://blogcdn.namehero.com/blog/wp-content/uploads/2024/12/06090755/pip3-1024x576.png)
Pip3 is a package management system used within the command line interface for the installation and management of Python Version 3 modules from the Python Package Index (PyPI). When working in earlier versions of Python the utility is referred to as ‘pip’ but provides the same functionality. Pip3 is solely utilized when working in Python 3 environments. Let’s dive in!
- What is the Python Package Index?
- How to install pip3 on Ubuntu?
- Now that pip3 is installed, what’s next?
- Install additional python packages using pip3
- Update pip3 to its latest version
- Upgrade a Python module which is already installed
- Removing a python module using pip3
- Obtain a list of installed packages using pip3
What is the Python Package Index?
The Python Package Index (PyPI) is a repository of software developed and shared within the python Community and Pip3 installs python modules/packages offered within it.
In this step by step guide we’ll be exploring the installation steps of pip3 on an Ubuntu Linux system in python environments. While doing so we’ll be using another utility called “apt-get” to install the pip3 package manager for python version 3 on the command line.
How to install pip3 on Ubuntu?
Before beginning the installation of pip3, it is very common that we first make sure our current software packages on Ubuntu are up to date or the pip3 install could fail.
With that being said, in this next step we will go through how to run a quick update to existing packages using the ‘apt-get’ utility on the command line interface and afterward our Ubuntu system should be ready for the pip3 install.
1. Open the Terminal Application
The entire process begins with opening the Terminal application which we’ll use to perform a quick update to Ubuntu and then install pip3.
Terminal can be opened by either going to the Application Launcher through the desktop interface and selecting “Terminal” or you can press and hold Ctrl + Alt + T as a shortcut to the Terminal application.
2. Update system packages to prepare Ubuntu for the pip3 install
Once the Terminal application has been opened up we would then enter in the ‘apt-update’ command to begin a quick upgrade to our Ubuntu system for all installed packages. This prepares Ubuntu for the pip3 install and is an important step.
Just note that this upgrade to system packages can sometimes take a minute or so to complete. But once the update finishes you can proceed onto the next step for the pip3 install.
![](https://images.surferseo.art/2b023a59-04a7-4501-88fe-eaab0b88d165.png)
As shown above, the -y flag is used with the ‘apt update’ command so we can skip the prompts and assume “yes” during installation questions.
3. Using apt-get to install pip3 and its dependencies
Now that we’ve completed the update to our Ubuntu system packages, we are ready to install pip3 and its dependencies/packages.
To begin the install of pip3 and any dependencies required, we will once again use the ‘apt-get’ utility much like in the previous step where we updated our system packages to prepare Ubuntu.
Using the following ‘apt install python3 pip’ command to begin installing pip3:
![](https://images.surferseo.art/d0b0fbec-7211-4377-b137-9669f7ad5aa1.png)
As shown above, the -y flag is used with ‘apt install python3 pip’ command so we can skip the prompts and assume “yes” during installation questions. This will automatically select “yes” during the process when prompted to install all the dependencies/packages needed for pip3.
At this point we have updated our Ubuntu system packages and finished the pip3 install with needed dependencies and are ready for the final step.
4. Check our work by verifying the version of python and the pip3 package manager
Now it is time to verify the installation by checking the current version number with the following command:
![](https://images.surferseo.art/a915e754-1e9f-4203-81fc-f3252fb46041.png)
As we can see from above, the pip install is on the latest version and since our command provided this output we should be all set and have verified the install was a success.
Alternatively you can also use the following command to verify pip3 and python installation:
![](https://images.surferseo.art/a04321fd-b97e-463c-9a1f-d85b71bd3807.png)
At this time the pip install is fully complete. The above command also verifies the pip3 install was a success and we can view the current pip3 and python version numbers.
Now that pip3 is installed, what’s next?
Now that we completed the pip install for python 3 on Ubuntu, but whats next? Below are some examples for different use cases which you may find helpful.
Using the help option to obtain usage details
If you’re unsure of all of the usage details for pip3 you can always use the below command to obtain them. The output from the following command is a list of helpful usage options for the pip3 package manager.
![](https://images.surferseo.art/92076c7e-5566-4bcb-bb9f-455370e8e0d2.png)
Install additional python packages using pip3
Need to install some additional packages? No problem!
Below is how we would install new modules using pip3 on Ubuntu. Just be sure to replace ‘module_name’ with the module you’d like installed when entering in the following command:
![](https://images.surferseo.art/27bf7bc2-64e2-4b66-b8c3-233b416802cc.png)
Update pip3 to its latest version
Need to update pip3? To upgrade pip3 to the latest version you would enter in the following command:
![](https://images.surferseo.art/54c5646c-07ef-4510-9f1e-c93357925575.png)
Upgrade a Python module which is already installed
Need to upgrade any existing python packages?
To upgrade any python packages which are already installed you would just enter in the below command. Just be sure to replace ‘module_name’ with the correct name of the specific module you wish to update:
![](https://images.surferseo.art/db4212b1-bb9a-4637-8bb3-7fea6a75a8eb.png)
Removing a python module using pip3
Alternatively you may find yourself needing to remove a module from a list of installed packages.
In order to remove a module, you would just enter in the below command. Just be sure to replace ‘module_name’ with the correct name of the module you wish to remove:
![](https://images.surferseo.art/550ce7e6-6793-40ae-8e95-42406490d613.png)
Obtain a list of installed packages using pip3
How do we obtain a list of installed packages using pip3? You can easily do so with the below command. This is handy for times when you’re unsure of the full module name during a removal or update.
To show a currently installed list of python packages using pip3 you would just enter in the following command and press enter:
![](https://images.surferseo.art/6463dcba-0813-4b27-ad58-fa6eee3f482c.png)
Leave a Reply