Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install python pip on Ubuntu 14.04

Tags:

python

pip

ubuntu

This is the command I used to install python-pip

sudo apt-get install python-pip

I get the following error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 python-pip : Depends: python-setuptools (>= 0.6c1) but it is not going to be installed
              Recommends: python-dev-all (>= 2.6) but it is not installable
E: Unable to correct problems, you have held broken packages.

I already installed the latest version of python-dev

When i try to install python-setuptools using sudo apt-get install python-setuptools I get the below error

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
 python-setuptools : Depends: python-pkg-resources (= 3.3-1ubuntu1) but 3.3-1ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

Explain me how to resolve the error and guide me the steps to get python-pip installed.

like image 549
krishna Avatar asked Nov 15 '15 06:11

krishna


People also ask

Why can't I pip install on Python?

One of the most common problems with running Python tools like pip is the “not on PATH” error. This means that Python cannot find the tool you're trying to run in your current directory. In most cases, you'll need to navigate to the directory in which the tool is installed before you can run the command to launch it.

Why is pip not installed on Ubuntu?

The python-pip package manager works as an independent package manager on Linux distribution. This means you need to install the pip tool separately from python programs. The pip command is not found an error raised on your Linux terminal window if the pip is not installed independently on Ubuntu 20.04 system.

Does Python 3.10 support pip?

Does Python 3.10 have pip? The current version of pip works on: Windows, Linux and MacOS. CPython 3.7, 3.8, 3.9, 3.10 and latest PyPy3.

Does Ubuntu 20.04 have pip?

The installed version may differ depending on the version of pip you've installed on your Ubuntu system. pip for Python 2 is not included with Ubuntu 20.04. To install pip for Python 2 on Ubuntu 20.04, you will have to use the get-pip script.


2 Answers

got the same error when I install python-pip, the following command solved my problem.

sudo apt-get install python-pkg-resources=3.3-1ubuntu1
sudo apt-get install python-setuptools
like image 66
seems Avatar answered Nov 09 '22 22:11

seems


download pip from https://bootstrap.pypa.io/get-pip.py

Then run the following (which may require administrator access):

python get-pip.py

This should get you going. If you get stuck again, read here: http://pip.readthedocs.org/en/stable/installing/

like image 36
Amnon Avatar answered Nov 09 '22 22:11

Amnon