Installing Python on CentOS 6 - a big pain

Steven D'Aprano steve+comp.lang.python at
Wed Jan 18 23:36:01 EST 2012

On Wed, 18 Jan 2012 19:10:43 -0800, alex23 wrote:

> On Jan 19, 4:00 am, John Nagle <na... at> wrote:
>>    It turns out that installing Python 2.7.2 on CentOS 6.0 is a lot
>>    of
>> work.
> There must have been some radical changes between Centos 5 & 6, then, as
> building Python 2.7 from scratch took all of 10 minutes.

Reading between the lines, I guess that John has set up his Centos boxes 
without development tools. I've known sys admins like that: in an effort 
to "increase security" they take away dev tools so that anybody breaking 
in can't install anything underhanded, at least in theory. 

With all the tools installed, it's a matter of a few minutes effort to 
build from scratch:

download the tar ball
extract the contents of the file
cd into the source directory
run ./configure
run make
optionally run make test
run sudo make altinstall

As a total n00b who'd never used make before, it took me 25 minutes 
effort on my first attempt, including reading the entire README file 
(twice!). Now I have the whole process down to about 30 seconds effort, 
and six minutes elapsed time, on my laptop.

But obviously you can't build from source without a compiler. So under 
those circumstances, it would be very difficult to build from source, as 
you need to install make, gcc, and who knows what other tools, and fight 
with the cryptic error messages generated until eventually it all Just 
Works. I hate to imagine how much effort would be involved.

And I can't fathom why John imagines that this is Python's fault.


More information about the Python-list mailing list