[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple graphic library for beginners

On 12 January 2018 at 06:47, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Fri, 12 Jan 2018 12:45:04 +1300, Gregory Ewing wrote:
>> Seems to me it would help if pip were to announce which version of
>> Python it's installing things into. And instead of just saying "not
>> compatible with this version of Python", say "not compatible with Python
>> X.Y.Z". That would make these kinds of problems much easier to diagnose.
> This.

That does indeed sound like a reasonable suggestion. I don't know
immediately where in the code we'd put something like that (a banner
that says "Installing packages into Python at <sys.prefix>" wouldn't
be too hard, it could probably be added near the top of
pip._internal.commands.InstallCommand.run(), but the compatibility
stuff is a lot trickier because of how pip's finder works) but I'm
sure PRs would be acceptable.

> 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.