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

Add an explicit --global installation option #4865

Open
ncoghlan opened this issue Nov 15, 2017 · 3 comments
Open

Add an explicit --global installation option #4865

ncoghlan opened this issue Nov 15, 2017 · 3 comments
Labels
type: enhancement Improvements to functionality

Comments

@ncoghlan
Copy link
Member

(Separating this specific piece out from the long discussion in #1668 about eventually making --user the default)

We eventually want pip to start defaulting to per-user installs when run outside a virtual environment, with an explicit opt-in switch to request global installs (i.e. directly into the Python runtime's site-packages directory).

As per the discussion on #1668, that setting will be called --global, since there isn't any self-evidently better alternative, and it should be easy to remember for anyone mixing and matching Python and JavaScript package management.

Adding the opt-in setting will mean that users will be able to start preparing themselves for that eventual change in the default behaviour (by passing it explicitly when it's the desired behaviour), and will also make it possible to override user=yes in a config file.

@pradyunsg
Copy link
Member

@ncoghlan How does this compare to #4575?

(sorry if this is terse; on the move)

@ncoghlan
Copy link
Member Author

From a UX perspective, I'd prefer to also offer the --global and --user spellings:

  • --global for consistency with other packaging tools that already default to per-user or environment local installs (most notably, npm)
  • --user for backwards compatibility with older versions of pip itself

However, I'd be fine with an approach that was based on #4575 and simply said:

  • --global is a shorthand alias for --scheme global
  • --user is a backwards compatibility alias for --scheme user

@pradyunsg pradyunsg added the type: enhancement Improvements to functionality label May 10, 2018
@ncoghlan ncoghlan changed the title Add an explicit --global installation option Add an explicit global installation option May 13, 2018
@ncoghlan ncoghlan changed the title Add an explicit global installation option Add an explicit --global installation option May 13, 2018
@ncoghlan
Copy link
Member Author

Adding a direct link into the #1668 discussion regarding the rationale for the --global name: #1668 (comment)

While the Debian patches to default to --user added a --system flag to force a system install, that name is fairly specific to Linux system Python installations - for pip in general "global" is a better name for "global to this Python installation". Debian can then adjust their patches to make --system an alias for --global.

Also cc'ing @brainwane, as I think this could be a good issue for someone to tackle at the PyCon US 2018 sprints :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements to functionality
Projects
None yet
2 participants