Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19141

Re: Installing Python on CentOS 6 - a big pain

From Benedict Verheyen <benedict.verheyen@gmail.com>
Subject Re: Installing Python on CentOS 6 - a big pain
Date 2012-01-20 10:39 +0100
References <4f1708cc$0$1649$742ec2ed@news.sonic.net> <a9b58f57-45a5-469d-a7d7-287b651c8e70@k3g2000pbn.googlegroups.com> <4f179db1$0$14012$c3e8da3$76491128@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.4875.1327052395.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 19/01/2012 5:36, Steven D'Aprano wrote:
> On Wed, 18 Jan 2012 19:10:43 -0800, alex23 wrote:
> 
<snip>
> 
> 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.
> 
<snip>

My first attempt to compile it on Debian took some extra steps,
as Python didn't find the ncurses and and readline libs.
But it was still easy to figure out how to build and install (locally) all
the necessary packages.
I leave the system installed python alone, and install the python version
I built in $HOME/usr/local so I can later use this in a virtualenv.

These are part of my notes from a while back so version might not be
up to date anymore.

1. Compile zlib
tar xzvf zlib-1.2.5.tar.gz
cd zlib-1.2.5
./configure --64 --prefix=$HOME/usr/local
make
make install

2. Compile readline
tar xzvf readline-6.1.tar.gz
./configure --enable-shared --prefix=$HOME/usr/local
make
make install

3. Compile ncurses
tar xzvf  ncurses-5.7
./configure --with-shared --enable-termcap --prefix=$HOME/usr/local
make
make install

4. Install Python from source
tar xzvf Python-2.7.2.gz
cd Python-2.7.2
export LDFLAGS="-L$HOME/usr/local"
./configure --enable-shared --prefix=$HOME/usr/local
make
make install

If i need to install a new version of Python, as I happen to have done today,
I only need to do step 4. Which is maybe 5 minutes of work.

Cheers,
Benedict

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Installing Python on CentOS 6 - a big pain John Nagle <nagle@animats.com> - 2012-01-18 10:00 -0800
  Re: Installing Python on CentOS 6 - a big pain Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-01-18 13:30 -0500
  Re: Installing Python on CentOS 6 - a big pain "J.O. Aho" <user@example.net> - 2012-01-18 21:16 +0100
  Re: Installing Python on CentOS 6 - a big pain Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-18 23:32 +0000
  Re: Installing Python on CentOS 6 - a big pain "Albert W. Hopkins" <marduk@letterboxes.org> - 2012-01-18 19:03 -0500
  Re: Installing Python on CentOS 6 - a big pain alex23 <wuwei23@gmail.com> - 2012-01-18 19:10 -0800
    Re: Installing Python on CentOS 6 - a big pain Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-19 04:36 +0000
      Re: Installing Python on CentOS 6 - a big pain Chris Angelico <rosuav@gmail.com> - 2012-01-19 20:43 +1100
        Re: Installing Python on CentOS 6 - a big pain Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-19 10:47 +0000
          Re: Installing Python on CentOS 6 - a big pain Chris Angelico <rosuav@gmail.com> - 2012-01-19 22:05 +1100
          Re: Installing Python on CentOS 6 - a big pain Noah Hall <enalicho@gmail.com> - 2012-01-19 11:08 +0000
          Re: Installing Python on CentOS 6 - a big pain Christian Heimes <lists@cheimes.de> - 2012-01-19 12:16 +0100
          Re: Installing Python on CentOS 6 - a big pain Chris Angelico <rosuav@gmail.com> - 2012-01-19 22:27 +1100
      Re: Installing Python on CentOS 6 - a big pain Benedict Verheyen <benedict.verheyen@gmail.com> - 2012-01-20 10:39 +0100
        Re: Installing Python on CentOS 6 - a big pain rusi <rustompmody@gmail.com> - 2012-01-20 09:32 -0800
        Re: Installing Python on CentOS 6 - a big pain Anssi Saari <as@sci.fi> - 2012-01-20 13:42 +0200
          Re: Installing Python on CentOS 6 - a big pain Benedict Verheyen <benedict.verheyen@gmail.com> - 2012-01-23 13:42 +0100

csiph-web