-
Notifications
You must be signed in to change notification settings - Fork 3k
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 example command uses wrong pip name #3488
Comments
This is an issue for naive Linux users too. When they are using a program that calls the python 3 pip, which suggests the upgrade on the terminal, some users then naively attempt to upgrade pip using the suggested command, which is in fact the python 2 version, as Barry points out. They get into trouble when they prefix sudo in front of the pip command. I'm not sure how exactly (it might be related to the patched version of pip that Debian / Ubuntu / Mint use), but that can cause chaos with the ownership of core directories under ~/.local and other user directories: ownership passes to root, meaning that nothing can be installed with any pip --user / pip3 --user command for that user until the permissions issue is fixed. |
Sounds good to me in principle. I don't know what exactly it should be printing though but a case that comes to mind that I guess we could defer further discussion on this until someone comes up with either an approach or a PR to cleanly handle all these cases. |
On 26 Jul 2017, at 18:26, Pradyun S. Gedam ***@***.***> wrote:
Sounds good to me in principle.
I don't know what exactly it should be printing though but a case that comes to mind that sys.argv[0] won't work would be invoking as python -m pip
sys.executable is always the a usable path to the python program that is running.
I guess we could defer further discussion on this until someone comes up with either an approach or a PR to cleanly handle all these cases.
Barry
… —
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#3488 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/APwpu6nJ5BzEf8qb_kkXhpPo3PQyqWdzks5sR3bfgaJpZM4HbFKf>.
|
Yeah, At some point we have to assume the user has a basic understanding of what's going on, and simply strive to not be misleading. So maybe the best thing would be to deliberately not look like something the user can copy and paste, such as
|
I give Linux users precisely that command, with the addition of the --user switch. As I recall, on systems where 'python' is python3, there is no 'pip3', which is one reason among others to go with the command that includes the interpreter. However, seeing the existing message, naive users attempt it without the --user, immediately see the permission failure, and out of habit prepend sudo. Perhaps some use the --user option, but I tend to hear from the ones reporting failure, not success. Do we want unsophisticated users doing that? |
Honestly, I wonder whether we wouldn't be better not suggesting a command, but just saying "you should consider upgrading pip". There are just so many possible variants on what's the right thing to do (Windows has its own set of things that would go wrong with the current advice) that we're always going to get people making mistakes. |
FTR; this issue is labelled as "deferred till PR". This label is essentially for indicating that further discussion related to this issue should be deferred until someone comes around to make a PR. This does not mean that the said PR would be accepted - it has not been determined whether this is a useful change to pip and that decision has been deferred until the PR is made. |
Shouldn't this be already resolved by #7532? |
Closing this out. |
On Mac OS X I have lots of python version installed.
$ pip3
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
pip on my Mac is the pip for python 2.7.
I suggest that the output should use the argv[0] name of the program not assume "pip" is good.
The text was updated successfully, but these errors were encountered: