CentOS 5.3 vs. Python 2.5

Discussion in 'Python' started by John Nagle, Nov 25, 2009.

  1. John Nagle

    John Nagle Guest

    My dedicated hosting provider wants to switch me to a new server with
    CentOS 5.3, so I have to look at how much work is required.

    CentOS 5.3 apparently still ships with Python 2.4. Worse, it
    requires Python 2.4 for its own internal purposes, and actually
    installing Python 2.5 breaks the package manager. There's
    no supported RPM for upgrading.

    It's apparently necessary to build Python 2.5 from source,
    build all the packages, and debug. Nor does that "just work".
    There's documentation, but some of it is in Japanese.

    http://blog.bashton.com/2008/python-25-rpms-for-rhel-5-centos-5/

    Google Translate gives me

    "[...] On this entry uses the src.rpm. Kitara dropped, rpmbuild-rebuild
    (rpm-rebuild, but often seen the entry, it says, there's this option only old
    rpm) [...]"

    I'm trying to figure that out.

    John Nagle
     
    John Nagle, Nov 25, 2009
    #1
    1. Advertising

  2. On Tue, 24 Nov 2009 22:42:28 -0800, John Nagle wrote:

    > My dedicated hosting provider wants to switch me to a new server with
    > CentOS 5.3, so I have to look at how much work is required.
    >
    > CentOS 5.3 apparently still ships with Python 2.4. Worse, it
    > requires Python 2.4 for its own internal purposes, and actually
    > installing Python 2.5 breaks the package manager. There's no supported
    > RPM for upgrading.
    >
    > It's apparently necessary to build Python 2.5 from source,
    > build all the packages, and debug.



    You shouldn't need *quite* that much effort, particularly if you don't
    care about tkinter. Just use the alternate installation so it doesn't
    stomp all over the 2.4 installation:

    ..configure
    make
    make altinstall

    You will need root or sudo for that last one.


    I don't have Centos 5.3, but I have Centos 5, and it seems to work fairly
    easily for me:

    $ wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
    ....
    18:39:11 (69.6 KB/s) - `Python-2.5.4.tgz' saved [11604497/11604497]
    $
    $ tar xzf Python-2.5.4.tgz
    $ cd Python-2.5.4
    $ ./configure
    ....
    $ make
    ....
    $ sudo make altinstall
    Password:
    ....
    $ python -V
    Python 2.4.3
    $ python2.5 -V
    Python 2.5.4


    And it all seems to just work for me.




    > Nor does that "just work". There's
    > documentation, but some of it is in Japanese.
    >
    > http://blog.bashton.com/2008/python-25-rpms-for-rhel-5-centos-5/


    I don't understand why you're using documentation for third-party RPMs as
    evidence that building from source will be troublesome.



    --
    Steven
     
    Steven D'Aprano, Nov 25, 2009
    #2
    1. Advertising

  3. John Nagle

    Jon Clements Guest

    On Nov 25, 8:13 am, Steven D'Aprano
    <> wrote:
    > On Tue, 24 Nov 2009 22:42:28 -0800, John Nagle wrote:
    > > My dedicated hosting provider wants to switch me to a new server with
    > > CentOS 5.3, so I have to look at how much work is required.

    >
    > >     CentOS 5.3 apparently still ships with Python 2.4.  Worse, it
    > > requires Python 2.4 for its own internal purposes, and actually
    > > installing Python 2.5 breaks the package manager.  There's no supported
    > > RPM for upgrading.

    >
    > >     It's apparently necessary to build Python 2.5 from source,
    > > build all the packages, and debug.

    >
    > You shouldn't need *quite* that much effort, particularly if you don't
    > care about tkinter. Just use the alternate installation so it doesn't
    > stomp all over the 2.4 installation:
    >
    > .configure
    > make
    > make altinstall
    >
    > You will need root or sudo for that last one.
    >
    > I don't have Centos 5.3, but I have Centos 5, and it seems to work fairly
    > easily for me:
    >
    > $ wgethttp://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
    > ...
    > 18:39:11 (69.6 KB/s) - `Python-2.5.4.tgz' saved [11604497/11604497]
    > $
    > $ tar xzf Python-2.5.4.tgz
    > $ cd Python-2.5.4
    > $ ./configure
    > ...
    > $ make
    > ...
    > $ sudo make altinstall
    > Password:
    > ...
    > $ python -V
    > Python 2.4.3
    > $ python2.5 -V
    > Python 2.5.4
    >
    > And it all seems to just work for me.
    >
    > > Nor does that "just work". There's
    > > documentation, but some of it is in Japanese.

    >
    > >http://blog.bashton.com/2008/python-25-rpms-for-rhel-5-centos-5/

    >
    > I don't understand why you're using documentation for third-party RPMs as
    > evidence that building from source will be troublesome.
    >
    > --
    > Steven


    And might I add on a box where there is no root access, but sufficient
    tools (compilers etc...)

    1) Compile from source
    2) Set PYTHONPATH correctly for your shell
    3) Set your normal path to include your Python rather than the
    system's default Python
    4) When installing modules (via setup.py install or easy_install)
    include a "home_dir=" (I think that's right OTTOMH) to somewhere in
    your home directory, and make sure step 2) complies with this.
    5) Double check with "which python" to make sure it's the correct
    version.

    hth
    Jon.
     
    Jon Clements, Nov 25, 2009
    #3
  4. John Nagle

    Jeff McNeil Guest

    On Nov 25, 4:45 am, Jon Clements <> wrote:
    > On Nov 25, 8:13 am, Steven D'Aprano
    >
    >
    >
    >
    >
    > <> wrote:
    > > On Tue, 24 Nov 2009 22:42:28 -0800, John Nagle wrote:
    > > > My dedicated hosting provider wants to switch me to a new server with
    > > > CentOS 5.3, so I have to look at how much work is required.

    >
    > > >     CentOS 5.3 apparently still ships with Python 2.4.  Worse, it
    > > > requires Python 2.4 for its own internal purposes, and actually
    > > > installing Python 2.5 breaks the package manager.  There's no supported
    > > > RPM for upgrading.

    >
    > > >     It's apparently necessary to build Python 2.5 from source,
    > > > build all the packages, and debug.

    >
    > > You shouldn't need *quite* that much effort, particularly if you don't
    > > care about tkinter. Just use the alternate installation so it doesn't
    > > stomp all over the 2.4 installation:

    >
    > > .configure
    > > make
    > > make altinstall

    >
    > > You will need root or sudo for that last one.

    >
    > > I don't have Centos 5.3, but I have Centos 5, and it seems to work fairly
    > > easily for me:

    >
    > > $ wgethttp://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
    > > ...
    > > 18:39:11 (69.6 KB/s) - `Python-2.5.4.tgz' saved [11604497/11604497]
    > > $
    > > $ tar xzf Python-2.5.4.tgz
    > > $ cd Python-2.5.4
    > > $ ./configure
    > > ...
    > > $ make
    > > ...
    > > $ sudo make altinstall
    > > Password:
    > > ...
    > > $ python -V
    > > Python 2.4.3
    > > $ python2.5 -V
    > > Python 2.5.4

    >
    > > And it all seems to just work for me.

    >
    > > > Nor does that "just work". There's
    > > > documentation, but some of it is in Japanese.

    >
    > > >http://blog.bashton.com/2008/python-25-rpms-for-rhel-5-centos-5/

    >
    > > I don't understand why you're using documentation for third-party RPMs as
    > > evidence that building from source will be troublesome.

    >
    > > --
    > > Steven

    >
    > And might I add on a box where there is no root access, but sufficient
    > tools (compilers etc...)
    >
    > 1) Compile from source
    > 2) Set PYTHONPATH correctly for your shell
    > 3) Set your normal path to include your Python rather than the
    > system's default Python
    > 4) When installing modules (via setup.py install or easy_install)
    > include a "home_dir=" (I think that's right OTTOMH) to somewhere in
    > your home directory, and make sure step 2) complies with this.
    > 5) Double check with "which python" to make sure it's the correct
    > version.
    >
    > hth
    > Jon.


    I'm in a RHEL3 - RHEL5.4 environment and the situation is exactly the
    same. The code I've written requires 2.5 or higher. I keep a /usr/
    local/pythons directory and manually install the versions I need
    there. I then use virtualenv so I don't have to worry about setting
    PYTHONPATH manually or anything. I just need to remember to use the
    right Python executable. I got to doing this when I discovered that
    there are issues with the Cluster Manager (Lucci) and some external
    Python packages (some of the Zope stuff, if I remember correctly).

    So, in addition to the above steps, you'll probably also want to
    include a '--prefix=.....' on the command line to the configure script
    in order to install in a non-standard location.
     
    Jeff McNeil, Nov 25, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rbt

    Python RPM and CentOS

    rbt, May 16, 2005, in forum: Python
    Replies:
    2
    Views:
    392
    Ken Godee
    May 17, 2005
  2. nat
    Replies:
    0
    Views:
    511
  3. Paul Boddie
    Replies:
    2
    Views:
    484
    Paul Boddie
    Apr 25, 2008
  4. weixiao.fan

    how to upgrade python on centOS 5.2

    weixiao.fan, Jun 28, 2008, in forum: Python
    Replies:
    0
    Views:
    446
    weixiao.fan
    Jun 28, 2008
  5. F.
    Replies:
    1
    Views:
    2,774
Loading...

Share This Page