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

Upgrade nonsense #5600

Closed
teo1978 opened this issue Jul 13, 2018 · 9 comments
Closed

Upgrade nonsense #5600

teo1978 opened this issue Jul 13, 2018 · 9 comments
Labels
auto-locked Outdated issues that have been locked by automation project: <downstream> When the cause/effect is related to redistributors

Comments

@teo1978
Copy link

teo1978 commented Jul 13, 2018

Environment

  • pip version: 8.1.1
  • Python version: 2.7.12
  • OS: Ubuntu 16.04

First I did:

sudo apt-get install python-pip

I know, if this installed a version that is not the latest, that's expected because I'm using my distro's package manager.

Then I used pip once to install some package, it's irrelevant which one:

$ pip install --user mercurial_keyring

The output ended with:

Successfully built [...blablabla...]
Successfully installed [...blablabla]
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.

Now, that's telling me that the command pip install --upgrade pip' command will allow me to upgrade to 10.0.1. Actually, it strongly suggests that it will upgrade to that specific version, it doesn't quite say that, but it does definitely promise that it will upgrade.

I ran:

$ pip install --upgrade pip

And the output was:

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 579kB/s 
Installing collected packages: pip
Successfully installed pip-8.1.1
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.

Now, if that is expected for whatever reason, then the message telling me to upgrade via this command was bullshit.

@pradyunsg
Copy link
Member

pradyunsg commented Jul 13, 2018

@teo1978 The language you've to describe the issue does make it very, uhm, non-inviting to respond to. I'll assume good intentions here.


Anyways, the incorrect installed version reporting was a bug in older versions of pip. This is no longer an issue in newer versions of pip. Can you confirm that pip 10.0.1 was indeed installed?

Other than that, your distro should have patched pip to not be showing that message when used.

I doubt I can comment more on this issue due to time constraints; hope the above helps. :)

@pfmoore
Copy link
Member

pfmoore commented Jul 13, 2018

I believe that Ubuntu is defaulting to --user installs but hasn't set the PATH correctly so that you get the user-installed copy of the pip wrapper as your pip command. So this is a vendor packaging bug, not a pip issue.

With regard to the message, it's legitimate for a pip not installed as part of a system package. Ideally distro vendors would have patched that message out when it's inappropriate, but they didn't - we're working with them on that in #5346.

#5599 is relevant here, as it discusses some of the pitfalls involved in upgrading system installations of pip manually. The problem on Ubuntu is that you're hitting (3) in the "General Advice" section, but Ubuntu have patched the defaults so you don't know that's what you're doing.

On another note, please consider your tone and whether you're criticising the right people when reporting issues. In this case you've been fairly critical of pip's maintainers (the description "bullshit" isn't exactly friendly) when actually it's entirely an Ubuntu issue.

@pradyunsg pradyunsg added the S: awaiting response Waiting for a response/more information label Jul 13, 2018
@pfmoore pfmoore added the project: <downstream> When the cause/effect is related to redistributors label Jul 13, 2018
@pradyunsg
Copy link
Member

Thanks @pfmoore for providing a more elaborate explanation here. I didn't think about the Ubuntu --user patch. :)

@teo1978
Copy link
Author

teo1978 commented Jul 13, 2018

Can you confirm that pip 10.0.1 was indeed installed?

I'm trying to check that but I get:

$ pip help
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 7, in <module>
    from pip._internal import main
ImportError: No module named _internal

so it looks like my installation is completely broken now.

On another note, please consider your tone

I don't understand what it is that you both seem to find so offensive. The only thing that I find might be perceived as out of tone in my report is the use of the word "bullshit", but that was just meant a statement of facts: the message is "bullshit" in that it is false and misleading, whatever the cause. I didn't think it would sound offensive.

and whether you're criticising the right people

I didn't criticise anybody. I just described what went objectively wrong, I didn't make any speculation as to who is to "blame" or who's fault it is. Another thing is that I may have reported it to the wrong people, but until one knows the exact cause of an issue (in which case I might as well fix it myself and issue a pull request) one can only try to guess who the issue belongs to and report it to the project that seems most likely to be responsible for it, and of course there's a margin of error. Often I waste my time reporting issues to Ubuntu and the reply (usually 4 years later) is that it is an upstream issue. This time apparently it was the other way around.

@pradyunsg
Copy link
Member

it looks like my installation is completely broken now.

Yeah. That's exactly what we've made #5599 for. You can probably look at the related issues linked there for possible existing solutions (with the same caveats listed in #5599).

@pfmoore
Copy link
Member

pfmoore commented Jul 13, 2018

completely broken

It's quite possible you can simply fix your PATH and you'll be fine (see #5599 for some hints) but I don't have time to spend any more of my evening debugging your issue for you.

@teo1978
Copy link
Author

teo1978 commented Jul 13, 2018

I don't have time to spend any more of my evening debugging your issue for you.

Thank you, I appreciate you trying to help, but I didn't expect anybody to debug "my issue for me". I came here to report what I believed to be your issue (which instead appears to be my distro's issue) to you.

@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Jul 13, 2018
@pradyunsg
Copy link
Member

IMO, there's nothing actionable here from pip's end -- as you noted, this needs changes to be made from your distro's end. I'll go ahead and close this issue since all the related work for this issue (like better communication with distro packagers) are being tracked and done elsewhere. :)

Thanks for filing this issue @teo1978!

@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
Projects
None yet
Development

No branches or pull requests

3 participants