On 2007-07-09 02:18:20 +0200, Christopher Arndt wrote: > Well, I just tried to test the python-turbogears package on the above > mentioned vmware image, but failed miserably :-( > > The python package on Gutsy seems to be broken at the moment (I > installed all updates as of today). The "python-*" packages, e.g. > "python-elementtree" [1], are installed into "/usr/share/python-support" > but this directory, nor any subdirectories, is not included in sys.path, > so when TurboGears tries to import ElementTree it fails with an ImportError.
python-support (and python-central) are frameworks to make python modules and extensions available for the installed python versions. The python modules get symlinked to /var/lib/python-support/python2.* (where also the .pyc are). And this directory is in sys.path: >>> sys.path ['', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/var/lib/python-support/python2.5', '/usr/lib/python2.5/site-packages/gtk-2.0', '/var/lib/python-support/python2.5/gtk-2.0', '/usr/lib/site-python'] (similar when running python2.4) > >>> from elementtree.ElementTree import ElemntTree > > from a normal interactive Python prompt fails with the same error. Wasn't elementtree included in python 2.5? [0] The python2.5 package provides: python2.5-cjkcodecs, python2.5-ctypes, python2.5-elementtree, python2.5-celementtree The package python-elementtree supports only python2.4. $ python2.4 >>> from elementtree.ElementTree import ElementTree >>> import elementtree.ElementTree >>> elementtree.ElementTree <module 'elementtree.ElementTree' from '/var/lib/python-support/python2.4/elementtree/ElementTree.pyc'> $ python2.5 >>> from xml.etree.ElementTree import ElementTree >>> import xml.etree.ElementTree >>> xml.etree.ElementTree <module 'xml.etree.ElementTree' from '/usr/lib/python2.5/xml/etree/ElementTree.pyc'> I got "tg-admin info" running if I change turbogears/command/i18n.py to ,---- | try: | from elementtree.ElementTree import ElementTree | except ImportError: | from xml.etree.ElementTree import ElementTree `---- and turbogears/toolbox/admi18n/pygettext.py to ,---- | try: | from elementtree.ElementTree import ElementTree, XML | except ImportError: | from xml.etree.ElementTree import ElementTree, XML `---- How to proceed with this problem? Regards, Michael 0: - Added a subset of Fredrik Lundh's ElementTree package. Available modules are xml.etree.ElementTree, xml.etree.ElementPath, and xml.etree.ElementInclude, from ElementTree 1.2.6. [ http://www.python.org/download/releases/2.5/NEWS.txt ] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

