Re: Python 2.3.3 vs. Python 2.3.4
Ok. This seems to have worked for me on Fedora Core 1, where there is a risk of hosing your system python if you do not do this right. I chose to build a clean verion of Python 2.3.4 and run it alongside other Python versions that were on the system. Get Python from www.python.org Put the tarball somewhere, like: /home/myhome/src/python/2.34 su to root cd /home/myhome/src/python/2.34 gunzip version_of_python.tgz tar -xvf version_of_python.tar cd version_of_python ./configure --prefix=/opt/python2.3.4 make make install ln -s /opt/python.2.3.4/bin/python2.3 /usr/bin/python2.3.4 cd /usr/bin chmod 755 python2.3.4 To test, type: python2.3.4 You should get a version listing of 2.3.4 and the Python console. Ctrl-D to exit. Then modify zopectl and runzope in /etc/zope-instance/bin to point to the new path to Python 2.3.4. Back these files up before making changes. Restart Zope, hopefully without any problems: service zopectl restart (assuming you have created such a service) If Zope will not start, you can always revert the paths in zopectl and runzope to the old python, whatever that was. Again, be very careful on Redhat / Fedora systems that rely on Python for critical services... I would hate to hear that someone overwrote their system Python! Good luck to the next vict... er... I mean... lucky person who trys this. Harlow Pinson Indepth Learning Email: hpinson@indepthl.com Web: http://www.indepthl.com Voice: 505-994-2135 FAX: 208-475-7678
hpinson@indepthl.com wrote:
Ok. This seems to have worked for me on Fedora Core 1, where there is a risk of hosing your system python if you do not do this right.
I chose to build a clean verion of Python 2.3.4 and run it alongside other Python versions that were on the system.
Get Python from www.python.org Put the tarball somewhere, like: /home/myhome/src/python/2.34 su to root
(see below)
cd /home/myhome/src/python/2.34 gunzip version_of_python.tgz tar -xvf version_of_python.tar cd version_of_python ./configure --prefix=/opt/python2.3.4 make make install ln -s /opt/python.2.3.4/bin/python2.3 /usr/bin/python2.3.4 cd /usr/bin chmod 755 python2.3.4
To test, type: python2.3.4 You should get a version listing of 2.3.4 and the Python console. Ctrl-D to exit.
Then modify zopectl and runzope in /etc/zope-instance/bin to point to the new path to Python 2.3.4. Back these files up before making changes.
Restart Zope, hopefully without any problems:
service zopectl restart (assuming you have created such a service)
If Zope will not start, you can always revert the paths in zopectl and runzope to the old python, whatever that was.
To be safe, you should rebuild the Zope extension modules after upgrading to the new Python: $ cd /path/to/Zope/src/ $ configure --with-python=/opt/python2.3.4/bin/python # + other args $ make $ sudo make install
Again, be very careful on Redhat / Fedora systems that rely on Python for critical services... I would hate to hear that someone overwrote their system Python!
This isn't really risky -- you have to try pretty hard to step on the system python. If you grant yourself write access on the target directory, you can even forego running Python's 'make install' as root, which makes it effectively impossible to screw up the system python. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com
participants (2)
-
hpinson@indepthl.com -
Tres Seaver