osdir.com


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

Simple graphic library for beginners


On 12 January 2018 at 06:45, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
>> The recommendation was already given to use "python3 -m pip". That gets
>> around those problems.
>
> If you google for installation instructions, they're nearly always given
> in terms of "use pip", not "use python3.4 -m pip".
>
> My point isn't that there is *no* solution to this problem, but that its
> not necessarily an *obvious* solution.

We've discussed this a number of times on the pip mailing lists and
changing recommendations like this is a slow and difficult process.
We're only just managing to get people to change websites from
recommending easy_install...

The question of "pip" vs "python -m pip" is a hard one. On Windows,
"py -m pip" is better for a lot of reasons, but the Unix users
involved in the debates were pretty reluctant to standardise on
"python -m pip" rather than the familiar "pip" (or "pip3"? I'm not
sure I completely follow what is natural for Unix users). Personally,
I still think a lot of confusion would be addressed if we settled on
"python -m pip" (with the established understanding that "python"
stands for whichever of "python", "python2", "python3", "py",
"/full/path/to/python", ... you're using to access Python) - but I
don't know how we make that the "obvious" approach.

For all of Bart's rhetoric, it *is* hard to find a good way to present
a consistent message when people go to Google/Stack Overflow first,
and only check the official docs as a last resort.

>>> How do I deal with permissions errors? [semi-rhetorical question -- I
>>> know *an* answer, but I don't know if it is the *right* answer]
>>
>> That's a fair point, but a perms error is reported properly by pip.
>
> Is it? Last time I tried, I just got an uninformative error that the
> package installation failed. Admittedly that was probably a year or two
> ago, so maybe the error message has been improved.

Installs from wheels are not bad, as pip is in control of the whole
process. Installs from source are dreadful, because it's
setuptools/distutils that give the errors and pip can't do anything
more than report the tracebacks produced (we tried trimming junk and
summarising, and got lots of complaints about hiding the causes of
problems).

But pip's error reporting isn't wonderful. We do tend to spew out
tracebacks rather than user-friendly messages. It's usually easy
enough to work out what the common tracebacks mean, but they are still
an intimidating wall of text to a non-expert. The usual "contributions
accepted" applies here, as pip developer time is extremely limited,
but it's not going to be an easy task for anyone.

Paul