Installation hell

Chris Angelico rosuav at gmail.com
Mon Dec 19 12:15:07 EST 2022


On Tue, 20 Dec 2022 at 03:56, Peter J. Holzer <hjp-python at hjp.at> wrote:
>
> It is however, quite noticable that almost everyone who asks a question
> about their Python installation on this list is using Windows. I don't
> think this is just because there are more Windows users than Linux or
> Mac Users.

Yes. I think there are a few reasons for that. One is that there are
many many lazy people in the world, and those people are likely to (a)
use the OS that came with their computers - usually Windows or Mac OS;
and (b) ask a question on a mailing list rather than spend some extra
minutes figuring things out with some web searches. An unrelated cause
might be a large number of student and/or novice programmers, who
simply don't have the groundwork knowledge to figure these things out;
and, again, they'll be using whatever OS their systems come with. Why
don't we see more Mac questions, then? No idea, and I'm not a Mac
person so I can't judge, but I would guess it's just a matter of
numbers - Windows outnumbers Mac OS (not counting iOS, which people
don't tend to be installing Python on) by a fairly significant factor.

> > I have a Linux VM that has several versions of Python3 on it.  Python3.8
> > came installed with the distro, but for some programs I need Python 3.9+.
> > If I forget which versions I have, how can I find out?
>
> I type python and then ctrl-D. The shell will then show me all commands
> starting with "python" in my path (your shell may have a different key
> combination for that, maybe tab-tab).

Ah, interesting. When I mentioned tab-tab I was aware that there are
others, but I'm not familiar with Ctrl-D. Normally that means "send
the command as it is", so I assume your shell is set up to take an
unfinished command and tab-complete it. Which shell is that?

(Also - what happens if you Ctrl-D in the middle of a line? Does that work?)

> But that works only for Python. Shell expansion works for any command.
> If you use Linux, learn how to use your shell (and maybe learn different
> shells - I personally prefer zsh, but I can also use bash, ksh, tcsh and
> if necessary even sh).

I agree, although I wouldn't recommend trying to get too much out of
sh as an interactive shell. It's best aimed at low-overhead script
running, and configured accordingly. Though it's sometimes good to
have some familiarity with a low-powered shell and the most basic of
input methods, just in case you're ever thrust into a situation where
a hard drive has crashed, /bin/bash is corrupted, you don't have
convenient access to external boot media, and you just want to get the
network interface up so you can do some basic fixes or data
recovery...

(Never been in precisely that situation, but I have had other key
programs unavailable for various reasons, and it's handy to know
alternatives!)

ChrisA


More information about the Python-list mailing list