In this tutorial, we will show you how to install Python Pip on Rocky Linux 9. For those of you who didn’t know, Python Pip is a command-line tool that allows you to easily install, upgrade, and manage Python packages from the Python Package Index (PyPI) or other third-party repositories. It is an essential tool for Python developers and users who want to easily manage their Python packages and dependencies. With Pip, you can install packages, uninstall packages, upgrade packages, list installed packages, search for packages, and create and use virtual environments.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of Python Pip on Rocky Linux. 9.
- A server running one of the following operating systems: Rocky Linux 9.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for Python.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install Python Pip on Rocky Linux 9
Step 1. The first step is to update your system to the latest version of the package list. To do so, run the following commands:
sudo dnf check-update sudo dnf update
Step 2. Installing Python.
Python is already installed by default on Rocky Linux 9. However, we need to install the Python development tools to be able to compile and install Python packages. Run the following command to install the Python development tools:
sudo dnf install python3-devel
For additional resources on installing Python, read the post below:
Step 3. Installing Python Pip on Rocky Linux 9.
After we have installed the Python development tools, we can proceed with the installation of Pip. Run the following command below to download and install Pip:
sudo dnf install python3-pip
Verify the version of Pip installed by running the following command:
Step 4. How to Use Python Pip on Rocky Linux 9.
- Installing Packages with Pip.
To install a package with Pip, open a terminal or SSH session and run the following command:
sudo pip3 install package_name
- Uninstalling Packages with Pip.
To uninstall a package with Pip, run the following command:
sudo pip3 uninstall package_name
- Upgrading Packages with Pip.
To upgrade a package with Pip, run the following command:
sudo pip3 install --upgrade package_name
- Listing Installed Packages with Pip.
To list all the packages installed on your system with Pip, run the following command:
Congratulations! You have successfully installed Python Pip. Thanks for using this tutorial for installing Python Pip on your Rocky Linux 9 system. For additional help or useful information, we recommend you check the official Python website.