Zope "picky" on Redhat Linux with Python1.5.2 and 2.2
I'm running Redhat Linux 7 and have installed Python2.2. However, the default Python on my system is Python1.5.2 (ie. if you type "python" at the command prompt, that's what you'll get). My scripts that wish to use Python2 usually have to state it explicitly with #!/usr/bin/python2. Why do I do this ? because Redhat use Python to create a lot of their software programs and some of them apparently only work with Python1.5.2 (which is what they distribute by default). Anyways, I now wish to install Zope2.5.0. I first downloaded the linux version Zope-2.5.0-linux2-x86 but notice that it is a precompiled binary and uses an install script (named "install" unsurprisingly) which uses the environmental Python home. Knowing that Zope2.5 requires Python2 and won't work with Python1.5.2, I decided it would be safer to get the Zope source, which I did and tried to install with the command /usr/bin/python2 w_pcgi.py But then it failed with a rather funny-sounding "if i and picky" error. cp: cannot stat `/usr/lib/python2.2/config/Makefile.pre.in': No such file or directory Traceback (most recent call last): File "/usr/local/Zope-2.5.0/w_pcgi.py", line 39, in ? if __name__=='__main__': main(sys.argv[0]) File "/usr/local/Zope-2.5.0/w_pcgi.py", line 37, in main import wo_pcgi; wo_pcgi.main(me) File "/usr/local/Zope-2.5.0/wo_pcgi.py", line 33, in main import build_extensions File "/usr/local/Zope-2.5.0/inst/build_extensions.py", line 30, in ? make('lib','python') File "/usr/local/Zope-2.5.0/inst/do.py", line 61, in make do("cp %s ." % wheres_Makefile_pre_in()) File "/usr/local/Zope-2.5.0/inst/do.py", line 32, in do if i and picky: raise SystemError, i So, I'm wondering how should I install Python2.5 on Redhat linux ? Use the binary Zope-2.5.0-linux2-x86 but then change my default Python to Python2 and risk breaking some Redhat programs (!) ? Or should it be possible to install from source as I have tried above ? Thank you. Stephen. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
install with the command /usr/bin/python2 w_pcgi.py
But then it failed with a rather funny-sounding "if i and picky" error.
Zope 2.5.0 requires python = 2.1.2 Get python 2.1.2 rpms from python.org Install them You will then have 3 pythons on your system :-) (python, python2.1 and python2) Build source with "/usr/bin/python2.1 w_pcgi" or "/usr/bin/python2.1 wo_pcgi" Adam
Thanks for the reply and help, Adam.
install with the command /usr/bin/python2 w_pcgi.py
But then it failed with a rather funny-sounding "if i and picky" error.
Zope 2.5.0 requires python = 2.1.2
Get python 2.1.2 rpms from python.org Install them You will then have 3 pythons on your system :-) (python, python2.1 and python2)
Sorry, I should have made it more explicitly clear that /usr/bin/python2 is a symlink to Python2.2 on my box. I've installed Python2.2 and hope that Zope does not require "Python 2.1.2 and nothing else" but rather "Python2.1.2 or greater". Therefore the error I receive is indeed when trying to install with "/usr/bin/python2.2 w_pcgi" I installed Python with the RPMs python2-2.2-1.i386.rpm and python2-devel-2.2-1.i386.rpm . Surely I don't need Python 2.1.2 as well ? Stephen. -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
----- Original Message ----- From: <Shriek@gmx.co.uk> To: "Adam Manock" <abmanock@earthlink.net> Cc: <zope@zope.org> Sent: Saturday, March 16, 2002 5:55 PM Subject: Re: [Zope] Zope "picky" on Redhat Linux with Python1.5.2 and 2.2 <snip>
Zope 2.5.0 requires python = 2.1.2
<snip>
I installed Python with the RPMs python2-2.2-1.i386.rpm and python2-devel-2.2-1.i386.rpm . Surely I don't need Python 2.1.2 as well ?
Yes, you do. I don't know why this should be the case, but zope 2.5.x *requires* python 2.1.2 apparently. Bill's response seems to indicate that this version dependency might not be the cause of the error that you are seeing, but if I were you, I'd just install 2.1.2 and save yourself a lot of trouble :-). tim
"Steve Drees" <drees@rangebroadband.com> wrote:
I installed Python with the RPMs python2-2.2-1.i386.rpm and python2-devel-2.2-1.i386.rpm . Surely I don't need Python 2.1.2 as well ?
Read the docs. It requires 2.1.2 and nothing else.
I read the docs but just had to confirm that Zope requires 2.1.2 and will work with nothing else. That seems mighty strange. Imagine BEA saying that Weblogic will work with Java1.2 but not Java1.3
"Tim Hicks" <tim@sitefusion.co.uk>
<snip>
Zope 2.5.0 requires python = 2.1.2
<snip>
I installed Python with the RPMs python2-2.2-1.i386.rpm and python2-devel-2.2-1.i386.rpm . Surely I don't need Python 2.1.2 as well ?
Yes, you do. I don't know why this should be the case, but zope 2.5.x *requires* python 2.1.2 apparently. Bill's response seems to indicate that this version dependency might not be the cause of the error that you are seeing, but if I were you, I'd just install 2.1.2 and save yourself a lot of trouble :-).
Thanks for the advice. Faced with installing a *third* version of Python on my machine though, I opted for the following ~
lmckusic@specialparents.com wrote: Here is a low hassle work around if you run Redhat Linux 7.2
Install the Zope-2.5.0-linux2-x86.tgz or latest. Just untar it, start it, connect and you are en-route.
This version of Zope already has the needed Python 2.2 installed and Zope does a fine job of finding and executing the local Python 2.2.
I run RH 7.2 and I have installed Zope 2.5.0 in an oddball disk area that has no path. Zope uses it's own copy of Python.
In short: all by itself the tar file seems to be a pretty complete package
Thanks. I had looked at the "install" script for the binary and feared that it would use my environmental python (python1.5.2) but you're right, I just ran ./install and then ./start and it seems to be working OK. Of course, I haven't tried creating any apps with it yet so it's too early to tell whether some packages have been broken but at least it's officially installed and running. Thanks. Stephen -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
Sorry, I should have made it more explicitly clear that /usr/bin/python2 is a symlink to Python2.2 on my box.
It is on my box too. On my box, python2.1 is a symlink to the python 2.1 interpreter also :-)
I've installed Python2.2 and hope that Zope does not require "Python 2.1.2 and nothing else" but rather "Python2.1.2 or greater".
Therefore the error I receive is indeed when trying to install with "/usr/bin/python2.2 w_pcgi"
replace with: "/usr/bin/python2.1 w_pcgi" and all should work fine (permissions and other unixy details permitting)
I installed Python with the RPMs python2-2.2-1.i386.rpm and python2-devel-2.2-1.i386.rpm . Surely I don't need Python 2.1.2 as well ?
Yep. You do. The three python versions coexist happily on RedHat without stepping on each other though, so don't worry :-) Adam
On Sat, 2002-03-16 at 02:27, Shriek@gmx.co.uk wrote:
I'm running Redhat Linux 7 and have installed Python2.2. However, the default Python on my system is Python1.5.2 (ie. if you type "python" at the command prompt, that's what you'll get). My scripts that wish to use Python2 usually have to state it explicitly with #!/usr/bin/python2.
Why do I do this ? because Redhat use Python to create a lot of their software programs and some of them apparently only work with Python1.5.2 (which is what they distribute by default).
Anyways, I now wish to install Zope2.5.0. I first downloaded the linux version Zope-2.5.0-linux2-x86 but notice that it is a precompiled binary and uses an install script (named "install" unsurprisingly) which uses the environmental Python home. Knowing that Zope2.5 requires Python2 and won't work with Python1.5.2, I decided it would be safer to get the Zope source, which I did and tried to install with the command /usr/bin/python2 w_pcgi.py
But then it failed with a rather funny-sounding "if i and picky" error.
IIRC, this is a directory permissions error. ISTR that if I chown -R the Zope source tree such that the whole tree is owned by the current user, it goes away.
So, I'm wondering how should I install Python2.5 on Redhat linux ? Use the binary Zope-2.5.0-linux2-x86 but then change my default Python to Python2 and risk breaking some Redhat programs (!) ?
It isn't a "risk" it's a guarantee. You basically break all of their printing system, as well as much of their configuration tools. I've done this on machines, and rebuilt their tools to use python2, but it wasn't exactly pretty. They *need* to make their stuff explicitly call the appropriate python if it isn't (for some odd reason) forward compatible. Another option may be to change the /usr/bin/python to /usr/bin/python1,5 in all their scripts. -- Bill Anderson Linux in Boise Club http://www.libc.org Amateurs built the Ark, professionals built the Titanic. Amateurs build Linux, professionals build Windows(tm).
install with the command /usr/bin/python2 w_pcgi.py
But then it failed with a rather funny-sounding "if i and picky" error.
IIRC, this is a directory permissions error. ISTR that if I chown -R the Zope source tree such that the whole tree is owned by the current user, it goes away.
Thanks for the tip. Tried that (chown -R root.root Zope-2.5.0) and then /usr/bin/python2 w_pcgi.py but still the same error unfortunately. cp /usr/lib/python2.2/config/Makefile.pre.in . cp: cannot stat `/usr/lib/python2.2/config/Makefile.pre.in': No such file or directory Traceback (most recent call last): File "/usr/local/Zope-2.5.0/w_pcgi.py", line 39, in ? if __name__=='__main__': main(sys.argv[0]) File "/usr/local/Zope-2.5.0/w_pcgi.py", line 37, in main import wo_pcgi; wo_pcgi.main(me) File "/usr/local/Zope-2.5.0/wo_pcgi.py", line 33, in main import build_extensions File "/usr/local/Zope-2.5.0/inst/build_extensions.py", line 30, in ? make('lib','python') File "/usr/local/Zope-2.5.0/inst/do.py", line 61, in make do("cp %s ." % wheres_Makefile_pre_in()) File "/usr/local/Zope-2.5.0/inst/do.py", line 32, in do if i and picky: raise SystemError, i SystemError: 256 No worries, I'm going to use the binary instead (although I've yet to work out whether the MySQLdb module _mysql can be installed into it - that's usually why I prefer installing from source).
So, I'm wondering how should I install Python2.5 on Redhat linux ? Use the binary Zope-2.5.0-linux2-x86 but then change my default Python to Python2 and risk breaking some Redhat programs (!) ?
It isn't a "risk" it's a guarantee.
That's what I feared. :(
You basically break all of their printing system, as well as much of their configuration tools. I've done this on machines, and rebuilt their tools to use python2, but it wasn't exactly pretty. They *need* to make their stuff explicitly call the appropriate python if it isn't (for some odd reason) forward compatible.
They'd probably say it was due to python2 not being backwards compatible :) Either way, it's a shame for everybody.
Another option may be to change the /usr/bin/python to /usr/bin/python1,5 in all their scripts.
Yowzers, think I'll stick to the Zope binary :) Stephen -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
participants (4)
-
Adam Manock -
Bill Anderson -
Shriek@gmx.co.uk -
Tim Hicks