[Distutils] requiring python 2.5

Phillip J. Eby pje at telecommunity.com
Fri Jun 15 17:48:31 CEST 2007


At 12:50 AM 6/15/2007 -0500, Rick Ratzel wrote:
>(Pdb) l
>  28     import xmlrpclib
>  29
>  30     import pdb
>  31     pdb.set_trace()
>  32
>  33  -> from enthought.traits.api import \
>  34          Trait, HasTraits, Str, List, Instance, Property
>  35
>  36     from enthought.enstaller.enstaller_traits import \
>  37          CreatableDir, Url
>  38     from enthought.enstaller.api import \
>
>(Pdb) import enthought
>
>(Pdb) p enthought.__path__
>('c:\\python25\\lib\\site-packages\\enstaller-2.1.0b1-py2.5-win32.egg\\enthought',)
>
>(Pdb) s
>--Call--
> > 
> c:\python25\lib\site-packages\enthought.traits-2.0b2.dev_r12224-py2.5-win32.egg\enthought\traits\api.py(16)<module>()
>-> """

Okay, so the problem here is that enthought.traits got imported 
*before* the __path__ was set.  The __path__ needs to get set before 
any enthought.* imports occur.


>(Pdb) p enthought.__path__
>('c:\\python25\\lib\\site-packages\\enstaller-2.1.0b1-py2.5-win32.egg\\enthought',)
>
>(Pdb) s
>ImportError: 'No module named traits.api'
> > 
> c:\python25\lib\site-packages\enstaller-2.1.0b1-py2.5-win32.egg\enthought\enstaller\session.py(33)<module>()
>-> from enthought.traits.api import \
>
>
>    I get a different ImportError now.

It appears that enthought.traits is not available in the enstaller 
egg; have you checked that?



More information about the Distutils-SIG mailing list