Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > re.compile missing in python 2.3.3/2.3.4???

Reply
Thread Tools

re.compile missing in python 2.3.3/2.3.4???

 
 
Steve
Guest
Posts: n/a
 
      07-09-2004
Hi,

I just installed a fresh copy of python 2.3.3 and python 2.3.4 and
everytime a there's a call to re.compile, it says:
Traceback (most recent call last):
File "setup.py", line 76, in ?
from distutils.core import setup
File "/usr/lib/python2.2/distutils/core.py", line 16, in ?
from distutils.util import grok_environment_error
File "/usr/lib/python2.2/distutils/util.py", line 207, in ?
_wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
AttributeError: 'module' object has no attribute 'compile'

First, how do I make the file 'setup.py' point to the directory:
/opt/python-2.3.4/lib/python2.3/distutils instead. It keeps using the
default, which is: /usr/lib/python2.2/distutils/. Second, is this
related to why re.compile won't work? Please help!!!

Steve

 
Reply With Quote
 
 
 
 
Michael Hudson
Guest
Posts: n/a
 
      07-09-2004
Steve <nospam@nopes> writes:

> Hi,
>
> I just installed a fresh copy of python 2.3.3 and python 2.3.4 and
> everytime a there's a call to re.compile, it says:
> Traceback (most recent call last):
> File "setup.py", line 76, in ?
> from distutils.core import setup
> File "/usr/lib/python2.2/distutils/core.py", line 16, in ?
> from distutils.util import grok_environment_error
> File "/usr/lib/python2.2/distutils/util.py", line 207, in ?
> _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
> AttributeError: 'module' object has no attribute 'compile'
>
> First, how do I make the file 'setup.py' point to the directory:
> /opt/python-2.3.4/lib/python2.3/distutils instead. It keeps using the
> default, which is: /usr/lib/python2.2/distutils/. Second, is this
> related to why re.compile won't work? Please help!!!


Almost certainly.

I'm a bit confused by what you're doing and what you've done <wink>.

You built Python 2.3.4 from source with

./configure --prefix=/opt/python-2.3.4

and ran "make install". This worked?

You're now trying to install some third part package using
"/opt/python-2.3.4/bin/python setup.py install" and *this* is failing
in the manner above? Something else?

At any rate, it sounds like your installation is a bit messed up.

Cheers,
mwh

--
Unfortunately, nigh the whole world is now duped into thinking that
silly fill-in forms on web pages is the way to do user interfaces.
-- Erik Naggum, comp.lang.lisp
 
Reply With Quote
 
 
 
 
Steve
Guest
Posts: n/a
 
      07-13-2004
Michael,


Michael Hudson wrote:
> Steve <nospam@nopes> writes:
>
>
>>Hi,
>>
>>I just installed a fresh copy of python 2.3.3 and python 2.3.4 and
>>everytime a there's a call to re.compile, it says:
>>Traceback (most recent call last):
>> File "setup.py", line 76, in ?
>> from distutils.core import setup
>> File "/usr/lib/python2.2/distutils/core.py", line 16, in ?
>> from distutils.util import grok_environment_error
>> File "/usr/lib/python2.2/distutils/util.py", line 207, in ?
>> _wordchars_re = re.compile(r'[^\\\'\"%s ]*' % string.whitespace)
>>AttributeError: 'module' object has no attribute 'compile'
>>
>>First, how do I make the file 'setup.py' point to the directory:
>>/opt/python-2.3.4/lib/python2.3/distutils instead. It keeps using the
>>default, which is: /usr/lib/python2.2/distutils/. Second, is this
>>related to why re.compile won't work? Please help!!!

>
>
> Almost certainly.
>
> I'm a bit confused by what you're doing and what you've done <wink>.
>
> You built Python 2.3.4 from source with
>
> ./configure --prefix=/opt/python-2.3.4
>
> and ran "make install". This worked?
>
> You're now trying to install some third part package using
> "/opt/python-2.3.4/bin/python setup.py install" and *this* is failing
> in the manner above? Something else?
>
> At any rate, it sounds like your installation is a bit messed up.
>
> Cheers,
> mwh
>


Thanks for taking the time out to answer my questiong. As a matter of
fact, the problem turned out to be just the 'PYTHONPATH' variable
pointing to an older installation (which resided in '/usr/bin').
Changing this to '/opt/python-2.3.4/lib/python-2.3' fixed the issue.

To your other question, yes installing the third party package by
running "/opt/python-2.3.4/bin/python setup.py install" was failing
because the Python interpreter kept looking for its libraries in
'/usr/lib/python-2.2'.

Thanks,

Steve

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: EXTERNAL: Re: missing python-config and building python on Windows Damon Register Python 0 08-01-2012 11:47 AM
missing python-config and building python on Windows Damon Register Python 0 08-01-2012 12:48 AM
[python-openid] 2.2.3 python package missing Stéphane Klein Python 0 06-28-2010 08:26 AM
Crystal Reports - Visual Basic UFL that implements this function is missing (or U2lcom.dll is missing) Les Caudle ASP .Net 3 09-03-2007 02:27 AM
Re: missing feature classes and missing fields Gary Herron Python 2 07-04-2006 10:29 PM



Advertisments