Question about installing python and modules on Red Hat Linux 6

Chris Angelico rosuav at gmail.com
Sat Nov 15 20:32:01 EST 2014


On Sun, Nov 16, 2014 at 12:08 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> Assuming it was RHEL 6, then installing Python 2.7 from source as a separate
> application from the system Python should be trivially easy, half an hour's
> work. Download the source, untar, run ./configure, make, make altinstall
> and you should be done. There may be a few bumps in the road to get
> optional components supported, in which case a skilled Linux admin (which I
> am not) might need perhaps a couple of hours. Depending on just how bad the
> bumps were, an unskilled admin like me might take a day or so, not three
> weeks, before giving up.

For a competent Linux system admin, this should be second nature.
Installing from source should be as normal an operation as writing a
shell script or scheduling a job with cron. But if the people
concerned aren't so much "POSIX system admins" as "RHEL admins", then
it's possible they depend entirely on the upstream repositories, and
aren't familiar with the dance of "can't find -lfoo so go install
libfoo-dev" (with occasionally a more exotic step, when the package
name isn't obvious, but Google helps there); in that case, it could
well take a long time, but that's like a Python programmer who's
having trouble debugging an asyncio program because s/he isn't used to
walking through the control flow of "yield from". I know I'm not
competent at that, and it doesn't stop me from being a programmer -
but I'm not going to come to python-list saying "This language sucks,
I can't find this bug", because the problem is a limitation in my own
skills.

Other RHEL people: Is there a yum equivalent to "apt-get build-dep",
which goes out and fetches all the compilers, libraries, build tools,
etc, needed to build a package from source? If so - and I wouldn't be
at all surprised if there is - that would be my recommended first
step: grab the build deps for Python 2.6 and use those to build 2.7.
Chances are that's all you need - that, plus the one little trick of
"make altinstall" rather than "make install".

ChrisA



More information about the Python-list mailing list