[Zope] 2.5b4 Win2k problem - 'module' object has no attribute 'compile'

Barry Pederson barryp@medicine.nodak.edu
Thu, 17 Jan 2002 21:19:35 -0600


Quoting Barry Pederson <barryp@medicine.nodak.edu>:

> Just did a fresh install of Zope 2.50b4 on a Win2k machine, and when
> running
> z2.py get this:

>   File "C:\Zope\Zope250\lib\python\ZPublisher\HTTPResponse.py", line 91, in
> ?
>     start_of_header_search=re.compile('(<head[^>]*>)',
> re.IGNORECASE).search
> AttributeError: 'module' object has no attribute 'compile'
> ------
> 
> (Had this happen on another Win2k machine too.  However 2.50 Beta 3 worked
> fine
> on that same machine)


Just to follow up to my own message, that problem seems to be caused by
accidentally using the wrong version of Python.  I had Python 2.2 installed on
both boxes, which would have been what was running when I just typed "z2.py" at
the command-line.  

Making sure to use the included Python 2.1.1+ (easy to do by using the
"start.bat") works fine.  

    Barry