Package python pip has no installation candidate ( Solved )

Package python pip has no installation candidate

Sometimes you get the error package python pip has no installation candidate in your Linux system. In this entire tutorial, you will know how to solve the error package python pip has no installation candidate in a very simple way.

Why the package python pip has no installation candidate Comes?

Most of the time python pip has no installation candidate Comes when you are updating the version of python. Suppose my Linux system has a python 2. xx version and I want to update the python3 version. To do so I will use the below lines of command.

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 20

The above command will install the python to the 3.8.20 version. You can check the current version of python using the below bash command.

sudo python3 --version
Checking the version of python in linux
Checking the version of python in Linux

But due to some corrupt modules of the python, you will get the package python-pip has no installation candidate error when you will try to install to the python3 pip module.

sudo apt install python3-pip

Output

E: Package 'python3-pip' has no installation candidate

Solution of the python pip has no installation candidate Error

Most of cases this type of error comes when you forget to update the Linux repository databases. To solve this error you have to follow the three steps.

Step 1: Enable the universe repository

The first step is to enable the universe repository. To do so you have to run the below command.

sudo add-apt-repository universe

Step 2: Synchronize package database

The next step is to update the package database so that you will easily install the latest modules provided by the Linux database.

sudo apt update

Step 3: Install the pip3 module

After all the steps the last step is to install the pip3 module. Run the below command to install it.

sudo apt install python3-pip

 

That’s all you have to do to remove the python-pip has no installation candidate error. Please note that when you try to install any package in Linux then first update the Linux packages and then install any module.

I hope you have liked this tutorial. If you have any queries then you can contact us for more help.

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

 
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner