Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
richardwhiuk opened this issue Apr 23, 2018 · 6 comments
Labels
auto-locked Outdated issues that have been locked by automation project: <downstream> When the cause/effect is related to redistributors resolution: duplicate Duplicate of an existing issue/PR

Comments

@richardwhiuk
Copy link

richardwhiuk commented Apr 23, 2018

  • 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.

@benoit-pierre
Copy link
Member

benoit-pierre commented Apr 23, 2018

You need to make sure you're using the right launcher if you upgrade pip. See #5221, particularly #5221 (comment).

@pradyunsg
Copy link
Member

Hey @richardwhiuk!

This issue is a duplicate of #5221. I hope the links @benoit-pierre posted are enough to help you resolve your issue. :)

@pradyunsg pradyunsg added resolution: duplicate Duplicate of an existing issue/PR S: awaiting response Waiting for a response/more information labels Apr 24, 2018
@pfmoore
Copy link
Member

pfmoore commented Apr 24, 2018

I agree that the message here is misleading. It's unfortunate that vendors, when packaging pip for use in system packages, don't patch the message to describe the correct command to use to upgrade the system pip.

If anyone has any suggestions for how pip can mitigate this, they'd be much appreciated. The problem is, of course, that we can't fix the old version(s) of pip that vendors still distribute, so any fix in pip is unlikely to be useful until all the vendor distributions have been upgraded to pip 18.1 (or whatever version we put any fix in :-()

@pradyunsg pradyunsg added project: <downstream> When the cause/effect is related to redistributors and removed S: awaiting response Waiting for a response/more information resolution: duplicate Duplicate of an existing issue/PR labels Apr 24, 2018
@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label May 11, 2018
@dennishaehn
Copy link

same here.

@pradyunsg
Copy link
Member

We're working on this in #5346, closing in favor of that issue.

@pradyunsg pradyunsg added resolution: duplicate Duplicate of an existing issue/PR and removed S: needs triage Issues/PRs that need to be triaged labels May 11, 2018
@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation project: <downstream> When the cause/effect is related to redistributors resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

5 participants