pip not working
Asked Answered
O

5

15

I am trying to install python-shapely with pip in Ubuntu 10.04. I got "Unknown or unsupported command 'install'" while I tried,

user@desktop:~$ pip install Shapely

I tried installing pip and got the following error:

user@desktop:~$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  python-pip
0 upgraded, 1 newly installed, 0 to remove and 396 not upgraded.
Need to get 0B/49.8kB of archives.
After this operation, 270kB of additional disk space will be used.
(Reading database ... 252574 files and directories currently installed.)
Unpacking python-pip (from .../python-pip_0.3.1-1ubuntu2.1_all.deb) ...
dpkg: error processing /var/cache/apt/archives/python-pip_0.3.1-1ubuntu2.1_all.deb (--unpack):
 trying to overwrite '/usr/bin/pip', which is also in package pip 0:0.13-1
Errors were encountered while processing:
 /var/cache/apt/archives/python-pip_0.3.1-1ubuntu2.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'd appreciate any comment/solution.

Thanks!

Ozoniferous answered 4/11, 2011 at 17:42 Comment(0)
S
15

Did you install pip first, then get this error, then try to install python-pip?

If so, first remove pip (apt-get remove pip), then install python-pip instead and try again.

(I just had the same problem, not sure if python 2.7 uses pip and 2.6 uses python-pip? That might be the issue.)

Spallation answered 6/12, 2011 at 14:29 Comment(1)
Update: python-pip works, but it's an old version. You're best off downloading the latest version of pip from the interwebs: pypi.python.org/pypi/pip#downloadsSpallation
M
5

Same happen to me, I'm running Ubuntu Lucid Lynx, 10.04 and there's a packaging conflict. Package pip (pearl installation software) has a conflict with the python-pip package. Both of them try to put a pip binary at /usr/bin/pip. You could do several things to solve the problem so choose the one that fits your needs:

1.- Remove "the pearl pip" if you don't use it and install the python pip

2.- Force installation of python pip with some "dpkg -f" or so, but this way your pip binary file will be overwritten

3.- Manually install ether of the packages changing the binary name, i.e. you manually install the python pip and instead of pip you just call the binary "python-pip"

Milore answered 5/6, 2012 at 10:32 Comment(1)
Option 1 is the best route, apt-get remove pip; apt-get install python-pip.Guardhouse
L
2

Seems to be broken download. Did you try easy_install?

sudo easy_install pip
Lavish answered 4/11, 2011 at 18:15 Comment(2)
Yes, I did and it says "Installed /usr/local/lib/python2.6/dist-packages/pip-1.0.2-py2.6.egg" but while I tried "pip install Shapely", am still getting "Unknown or unsupported command 'install'".Ozoniferous
Hi.The culprit is probably Strawberry Perl. I would suggest checking to see if it is installed. If so, you could move it farther down the path, i.e., "behind" (reading left to right) your Python entry.Titmouse
M
0

The problem raise because pip is in strawberry perl and Python both, if Perl's pip hit this error comes

$ which pip /cygdrive/c/strawberry/perl/bin/pip

Solution 1. C:\Python27\Scripts\pip install south or 2. Keep python path before strawberry perl or 3. remove strawberry perl path from path variable...

Malvasia answered 31/12, 2014 at 9:21 Comment(0)
I
0

Leave everything, Install latest version of python from its https://www.python.org/downloads .It already contain PIP, so open CMD from start and give him path to reach folder where python is installed and open "Script" folder where pip is build-in installed e.g. c:\Python36-32\Script And then write pip install module_name and enjoy,,,

Possibly you will have to open Administrator CMD, SO after typing cmd in start when you see CMD is on list press CTRL+SHIFT+ENTER and press OK in pop-up dialog and you will have administrative CMD.

Ilo answered 9/10, 2017 at 18:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.