In this article, we will show you how to install PIP on the Rocky Linux 9 operating system. We will also show you how to upgrade PIP to the latest version of Rocky Linux 9.
Topic of Contents:
- Updating the Rocky Linux 9 Package Repository Cache
- Installing PIP on Rocky Linux 9
- Checking If PIP is Working on Rocky Linux 9
- How to Upgrade PIP to the Latest Version in Rocky Linux 9
- How to Use PIP to Manage the Python Packages/Modules
- Conclusion
Updating the Rocky Linux 9 Package Repository Cache
First, update the package repository cache of Rocky Linux 9 with the following command:
The package repository cache of Rocky Linux 9 should be updated.
Installing PIP on Rocky Linux 9
Python PIP is available in the official package repository of Rocky Linux 9. So, it is easy to install.
To install Python PIP on Rocky Linux 9, run the following command:
To confirm the installation, press Y and then press <Enter>.
Python PIP is being downloaded from the official package repository of Rocky Linux 9. It takes a few seconds to complete.
If you see the following prompt, press Y and then press <Enter> to accept the GPG key of the Rocky Linux 9 package repository.
Python PIP should be installed.
Checking If PIP is Working on Rocky Linux 9
To check whether you can access PIP and if PIP is working on Rocky Linux 9, run the following command:
If PIP is accessible and it’s working, the installed version number of PIP should be printed. At the time of this writing, Rocky Linux 9 has PIP 21.2.3 in its package repository. Newer versions of PIP may be available. So, you might want to upgrade it to the latest version. We will show you how to do that in the next section of this article.
How to Upgrade PIP to the Latest Version in Rocky Linux 9
To check whether a newer version of PIP is available and upgrade PIP to the latest version in Rocky Linux 9, run the following command:
PIP should be upgraded to the latest version if newer versions of PIP is available in the PyPi package repository.
To check the version number of PIP after the upgrade, run the following command. As you can see, PIP was upgraded to 23.1.2 from 21.2.3. By the time you read this article, you may get a newer version of PIP than 23.1.2.
How to Use PIP to Manage the Python Packages/Modules
If you want to know more about PIP and how to use it, we recommend you to read the article on How to Manage the Python Packages with PIP. In this article, we showed you how to install the new Python packages, list the installed Python packages, uninstall the Python packages with PIP, and so on.
Conclusion
We showed you how to install Python PIP on Rocky Linux 9. We also showed you how to upgrade PIP to the latest version in Rocky Linux 9.