On Fri, Jan 12, 2018 at 10:38 AM, Paul Moore <[email protected]> wrote: > On 12 January 2018 at 06:47, Steven D'Aprano > <[email protected]> wrote:
>> If pip is joined at the hip to a specific version of Python, I think that >> we ought to be able to specify the version number like we can with Python. >> >> Something like: >> >> pip ... # use whichever version of pip comes first on the PATH >> pip3.6 ... # use the pip installed with Python 3.6 >> pip2.7 ... # use the pip installed with Python 2.7 > > Well, that's sort of how it's intended to work, but in practice it > doesn't seem to be as straightforward as it ought to be. I can't > really say why, as it's a Unix-only thing and I don't really > understand the reasons, but it's why I'm a fan of the "python -m pip" > approach. There's discussion on the pip tracker if you're interested > enough to go searching - I know it's something that's been debated, > but I don't recall the context. In general I think more than one app and executable with same name on a system already asks for problems. On Windows I had issues with pip and pygame and I have two Pythons - 2.7.14 and 3.6.2. The problem was that I could not make it install to 2.7, and tried many options, looking in SO there were so many different solutions, but finally I found something that reinstalled newer pip, but I don't remember frankly. My opinion (from Windows user's POV) - I'd prefer if there should be only one PIP in system, so running pip will unambigiosly mean that I run (or upgrade) THE pip. (and not something which I don't even know where it is located). Ideally also it should be installed in separate Directory. So I'd have folders: python 27 python 36 pip And the target Python where the package will be installed should be defined by a switch, e.g. 'pip -2', 'pip -3' (in analogy with 'py -2', 'py -3'). The question is though, how pip will know what version(s) of python I have, and if I installed them later? Hmm, not an easy problem. So in this case pip shoud track the multiple versions each time I install another version of python. Mikhail -- https://mail.python.org/mailman/listinfo/python-list
