![]() |
VOOZH | about |
pip3 is the official package manager for Python 3 on Linux systems. It is used to install, upgrade and manage Python packages from the Python Package Index (PyPI), handling dependencies automatically and making it easy to add external modules to Python projects.
To install a Python package using pip3, run the following command in your terminal:
pip3 install package_name
Before installing pip3, it's essential to ensure that Python 3 is installed on your Linux system. Open a terminal and type the following command:
python3 --version
This command should display the version of Python 3 installed on your system. If Python 3 is not installed, you can install it using your distribution's package manager.
Ensure that your system's package manager is up to date. Use the following commands based on your Linux distribution:
For Debian/Ubuntu-based systems:
sudo apt update
sudo apt upgrade
For Red Hat/Fedora-based systems:
sudo dnf update
Once Python 3 is installed and the package manager is updated, you can install pip3. Use the following command:
For Debian/Ubuntu-based systems:
sudo apt-get install python3-pip
Note: In this pip3 is already installed in Linux that is why it is displaying 0 upgraded, 0 newly installed.
For Red Hat/Fedora-based system:
sudo dnf install python3-pip
To check if pip3 was installed correctly, run:
pip3 --version
This command should display the installed version of pip3.
It's a good practice to upgrade pip3 to the latest version. Use the following command:
sudo pip3 install --upgrade pip
This ensures that you have the latest version of pip3 with bug fixes and new features.