On Nov 25, 4:45 am, Jon Clements <jon...@googlemail.com> wrote: > On Nov 25, 8:13 am, Steven D'Aprano > > > > > > <ste...@remove.this.cybersource.com.au> 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. -- http://mail.python.org/mailman/listinfo/python-list