Skip to content

pip recommends that you do something isn't supported and breaks pip entirely #5326

@richardwhiuk

Description

@richardwhiuk
  • Pip version: 8.1.1 / 10.0.1
  • Python version: 2.7.12
  • Operating system: Ubuntu 16.04

Description:

pip, as shipped by Ubuntu 16.04, from python-pip, recommends that you upgrade pip. Doing so on Ubuntu 16.04 breaks pip completely.

What I've run:

$ docker run -it ubuntu:16.04
root@ef18de253a1f:/# sudo apt-get install python-pip --assume-yes
...
root@ef18de253a1f:/# pip freeze
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Ah right, pip is out of date and is recommending I upgrade. Let's do that:

root@ef18de253a1f:/# pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 1.2MB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed pip-10.0.1
root@ef18de253a1f:/# pip --help
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

Oh dear, pip appears to be completely broken.

Using /usr/local/bin/pip does work, but is unexpected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationproject: <downstream>When the cause/effect is related to redistributorsresolution: duplicateDuplicate of an existing issue/PR

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions