Search code examples
pythonpython-3.xlinuxpip

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


$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-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
However the following packages replace it:
  python3-pip

both my pip and pip3 are installed in python 3

pip -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)


pip3 -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)

Now i cant install pip ...it shows above error


Solution

  • If you have python(python2) installed you then you can use following command to install pip(for python2).

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

    Now you can check for pip2

    pip2 --version
    

    I hope these will help you