[Python-Dev] cpython (3.4): Issue #22295: Adopt 'python -m pip' as the preferred invocation
Nick Coghlan
ncoghlan at gmail.com
Sat Sep 6 21:36:12 CEST 2014
On 6 Sep 2014 23:15, "Paul Moore" <p.f.moore at gmail.com> wrote:
>
> On 6 September 2014 13:47, Skip Montanaro <skip at pobox.com> wrote:
> > Based on the comment in the second issue, it doesn't appear this will
> > be resolved until 1.7 at the earliest.
>
> The second issue is specific to setuptools, where we have some very
> unpleasant hacks to deal with the setuptools/distribute mess.
>
> Having said that I don't have an immediate feel for what proportion of
> the issues around --user are fixed in 1.6, as I don't personally use
> --user much.
Using virtual environments also avoids some bad interactions between
pkg_resources.requires() and the way Fedora (et al) handle parallel
installation of mutually incompatible versions of components that use the
same module namespace (e.g. CherryPy 2 vs CherryPy 3) into the system
Python.
The specific reason for the assumption of virtual environment usage on
POSIX is slightly different though: inside a virtual environment created
with pyvenv, "python" always refers to Python 3, regardless of platform.
Thus, the assumption let me avoid a long-winded explanation of PEP 394 and
why the system-wide "python" refers to Python 2 and you need to run
"python3 -m pip" to install into Python 3 instead. It was the system level
pip vs pip3 distinction that prompted the original change to recommending
"-m pip", and I realised explaining the vagaries of python vs python3 would
be just as distracting & uninteresting for most users.
There's a question at the end of the document about installing into the
system Python that could probably be expanded on with more details, but
there really are enough ugly edge cases to running custom code in the
system Python (at least currently) that the simplest answer is "don't".
Cheers,
Nick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140907/b895328e/attachment.html>
More information about the Python-Dev
mailing list