-
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
cannot do --user install on homebrew #2683
Comments
FWIW I ran into a similar thing in a different context - with my cpython trunk build. There's some limitations in sysconfig that drive it, from memory. |
Homebrew sets a Python specific |
Homebrew changes the default install prefix so that packages are installed to the HOMEBREW_PREFIX (i.e. /usr/local) prefix and not to python's private, version-specific prefix (i.e. /usr/local/Cellar/python/2.7.8_2). There's a good argument that Homebrew's solution is morally incorrect but we try hard to avoid carrying patches that will never be merged upstream. There's an annoying but documented workaround involving passing prefix= at install time, like this:
Proposals so far for resolving this are https://bugs.python.org/issue22269 (allowing --user to trump --prefix in distutils option parsing instead of complaining about a conflict) and Homebrew/legacy-homebrew#31811 (patching dist.py). (These are actually the same solution; Homebrew is happy to carry a patch as soon as it's accepted upstream, without waiting for it to actually appear in a release.) A possible workaround is for pip to always pass a null prefix to setup.py when --user is selected, as in our workaround. |
@tdsmith - The Back to |
The |
Aside: I don't believe Homebrew packages virtualenv; I've rejected PRs for it before. |
Thanks for flagging that our workaround doesn't work with wheels as is; I hadn't realized but I guess I should have. |
@dstufft - are you suggesting that pip could always do |
Yes. |
Fixes bug pypa#2683 There are two changes here; one to fix the using-wheels codepath and one to fix the no-wheels codepath. Two tests are introduced, one to test each codepath.
Closed by #2934 |
With today's
get-pip.py
(and with every other version of pip I tried):For some reason, Pip thinks that every install into homebrew python (perhaps any python with a non-standard prefix?) is a
--prefix
install, and refuses to let me install anything as--user
.The text was updated successfully, but these errors were encountered: