pip3 not getting installed on Ubuntu

30 Views Asked by At

I am trying to install pip3 on Ubuntu using the following command sudo apt install python3-pip

And in response, I am getting the following output

The Error

Package python3-pip is not available but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

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

I just want to install pip3, please provide a way to solve this!

1

There are 1 best solutions below

0
mac On

If python3-pip package is not available in your package manager, it might be due to your package list being outdated or because python3-pip is not available for your specific Ubuntu version or repository.

You can try installing pip for Python 3 using the get-pip.py script provided by the Python Packaging Authority. Here's how:

First, ensure you have python3 and python3-setuptools installed:

sudo apt update
sudo apt install python3 python3-setuptools

Then, download the get-pip.py script:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Next, run the script with Python 3:

sudo python3 get-pip.py

After the installation is complete, you can verify that pip3 is installed by checking its version

pip3 --version