
whrauser at erols
Jan 20, 2002, 3:32 PM
Post #1 of 3
(113 views)
Permalink
|
|
Re: [ZC] 162/ 3 Comment "Python errors during installation"
|
|
Guido, Didn't expect a reply on Sunday. Thanks. The Zope distribution includes its own distribution of Python 2.1.1+ complete with the standard lib/test suite (see way below). I added a print to the Zope install module to verify it was using Zope's version, it was: Zope is installing with: 2.1.1+ (#2, Dec 21 2001, 17:47:18) [GCC 2.7.2.3] You are correct, of course. The errors I mentioned are in all Python distributions. My complaint here is that they are stopping the Zope installation, at least they do for me. The correction is not to fix the py modules as I suggested -- that was my expedient way to get Zope to install -- but to figure out why they kill the Zope installation. I went back and did reinstall again , verified that it does happen, and captured the output: Here is the output if I don't change the test modules linux:/usr/local/zope/Zope-2.5.0b4-linux2-x86 # ./install -u walt -g users > install.log File "/usr/local/zope/Zope-2.5.0b4-linux2-x86/lib/python2.1/test/nocaret.py", line 2 [x for x in x] = x SyntaxError: can't assign to list comprehension SyntaxError: from __future__ imports must occur at the beginning of the file (test_future3.py, line 3) SyntaxError: from __future__ imports must occur at the beginning of the file (test_future4.py, line 3) SyntaxError: from __future__ imports must occur at the beginning of the file (test_future5.py, line 4) SyntaxError: from __future__ imports must occur at the beginning of the file (test_future6.py, line 3) SyntaxError: from __future__ imports must occur at the beginning of the file (test_future7.py, line 3) linux:/usr/local/zope/Zope-2.5.0b4-linux2-x86 # and this: ------------------------------------------------------------------------------ Compiling python modules !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! There were errors during Python module compilation. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The install was a failure, it did not create the start and stop scripts. Here is the output if I correct those test routines: ------------------------------------------------------------------------------ Compiling python modules ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ creating default inituser file Note: The initial user name and password are 'admin' and 'YTzT1!Qk'. You can change the name and password through the web interface or using the 'zpasswd.py' script. chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/inituser chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/inituser chmod 0660 /usr/local/zope/Zope-2.5.0b4-linux2-x86/inituser chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/var chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/var chmod 0771 /usr/local/zope/Zope-2.5.0b4-linux2-x86/var ------------------------------------------------------------------------------ setting dir permissions ------------------------------------------------------------------------------ creating default database chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/var/Data.fs chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/var/Data.fs chmod 0660 /usr/local/zope/Zope-2.5.0b4-linux2-x86/var/Data.fs ------------------------------------------------------------------------------ Writing the pcgi resource file (ie cgi script), /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi chmod 0775 /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi ------------------------------------------------------------------------------ Creating start script, start chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/start chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/start chmod 0771 /usr/local/zope/Zope-2.5.0b4-linux2-x86/start ------------------------------------------------------------------------------ Creating stop script, stop chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/stop chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/stop chmod 0771 /usr/local/zope/Zope-2.5.0b4-linux2-x86/stop ------------------------------------------------------------------------------ Done! ------------------------------------------------------------------------------ Compiling python modules !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! There were errors during Python module compilation. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The install was a failure, it did not create the start and stop scripts. Here is the output if I correct those test routines: ------------------------------------------------------------------------------ Compiling python modules ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ creating default inituser file Note: The initial user name and password are 'admin' and 'YTzT1!Qk'. You can change the name and password through the web interface or using the 'zpasswd.py' script. chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/inituser chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/inituser chmod 0660 /usr/local/zope/Zope-2.5.0b4-linux2-x86/inituser chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/var chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/var chmod 0771 /usr/local/zope/Zope-2.5.0b4-linux2-x86/var ------------------------------------------------------------------------------ setting dir permissions ------------------------------------------------------------------------------ creating default database chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/var/Data.fs chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/var/Data.fs chmod 0660 /usr/local/zope/Zope-2.5.0b4-linux2-x86/var/Data.fs ------------------------------------------------------------------------------ Writing the pcgi resource file (ie cgi script), /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi chmod 0775 /usr/local/zope/Zope-2.5.0b4-linux2-x86/Zope.cgi ------------------------------------------------------------------------------ Creating start script, start chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/start chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/start chmod 0771 /usr/local/zope/Zope-2.5.0b4-linux2-x86/start ------------------------------------------------------------------------------ Creating stop script, stop chgrp users /usr/local/zope/Zope-2.5.0b4-linux2-x86/stop chown walt /usr/local/zope/Zope-2.5.0b4-linux2-x86/stop chmod 0771 /usr/local/zope/Zope-2.5.0b4-linux2-x86/stop ------------------------------------------------------------------------------ Done! This worked correctly! HERE IS THE ZOPE DISTRIBUTION PYTHON 2.1.1+ walt [at] linu:/usr/local/zope/Zope-2.5.0b4-linux2-x86/bin> ls -l total 1560 -rwxrwxr-x 1 walt nogroup 1593144 Dec 21 17:25 python walt [at] linu:/usr/local/zope/Zope-2.5.0b4-linux2-x86/bin> ./python Python 2.1.1+ (#2, Dec 21 2001, 17:47:18) [GCC 2.7.2.3] on linux2 Type "copyright", "credits" or "license" for more information. >>> import sys >>> sys.version '2.1.1+ (#2, Dec 21 2001, 17:47:18) \n[GCC 2.7.2.3]' >>> and SuSE LINUX 7.2 ALSO INCLUDES a PYTHON 2.1.1 walt [at] linu:~> cd /usr/bin walt [at] linu:/usr/bin> ls -l python* lrwxrwxrwx 1 root root 9 Jan 20 12:48 python -> python2.1 -rwxr-xr-x 1 root root 580312 Sep 24 01:30 python2.1 walt [at] linu:/usr/bin> python Python 2.1.1 (#1, Sep 24 2001, 05:28:47) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import sys >>> sys.version '2.1.1 (#1, Sep 24 2001, 05:28:47) \n[GCC 2.95.3 20010315 (SuSE)]' >>> Hope there are enough clues here to assist in tracking this down. Thanks again for your help, Walt =================================================== On Sunday 20 January 2002 12:10, you wrote: > Issue #162 Update (Comment) "Python errors during installation" > Status Pending, Zope/bug low > To followup, visit: > http://collector.zope.org/Zope/162 > > ============================================================== > = Comment - Entry #3 by gvanrossum on Jan 20, 2002 12:10 pm > > Here's a different theory. Python 2.1 (and 2.1.1 and 2.1.2) contains > several files in its test suite with deliberate syntax errors. Could it be > that the Zope installation tries to compile these files and fails? (In > Python 2.2 this has been fixed by hiding the syntax errors inside exec > statements.) ________________________________________ > = Comment - Entry #2 by gvanrossum on Jan 20, 2002 12:06 pm > > Sounds like somehow the Python version asked to run the tests is not the > Python version for which the tests were written; but there could be other > explanations (which I don't know). > > I don't know enough about the Zope install to understand more. Does Zope > install its own version of Python? Does it run the Python test suite? > ________________________________________ > = Request - Entry #1 by Anonymous User on Jan 20, 2002 9:05 am > > When I install Zope on linux (both RH 7.2 and SuZE 7.3), I get errors from > the Python test routines: nocaret.py, test_future3.py, test_future4.py,-- as you say, they are not being caught > ...., test_future7.py. > > The error in nocaret is can't assign to a list comprehension, while the > test_future errors have to do with from __future__ import statements. > > For 2.4.1, the errors occur, but the install continues. > > For 2.5.0b4, the errors occur and the install aborts with Python errors. I > fixed up the errors (not sure what to do with the nocaret error) to get > 2.5.0b4 to install. The test_future errors are quite obvious. > > I'm new to Zope after attending the talk that Everitt and Kromer gave to > the Columbia Linux User's Group last week. So I'm confused why there are > Python install errors in a Zope release -- is it only my problem? > > Walt > ==============================================================
|