[Pkg-xen-devel] Bug#624788: Python version issue: "ImportError: No module named lxml"

Moonwalker moonwalker at hotbox.ru
Sun May 1 16:15:26 UTC 2011


Package: xen-utils-4.0
Version: 4.0.1-2

Right after another Wheezy distribution update I've faced the following issue with "xm".
=====
host:~# xm new /etc/xen/domains/test.cfg
Unexpected error: <type 'exceptions.ImportError'>

Please report to xen-devel at lists.xensource.com
Traceback (most recent call last):
  File "/usr/lib/xen-4.0/bin/xm", line 8, in <module>
    main.main(sys.argv)
  File "/usr/lib/xen-4.0/lib/python/xen/xm/main.py", line 3620, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib/xen-4.0/lib/python/xen/xm/main.py", line 3644, in _run_cmd
    return True, cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib/xen-4.0/lib/python/xen/xm/main.py", line 1449, in xm_importcommand
    cmd = __import__(command, globals(), locals(), 'xen.xm')
  File "/usr/lib/xen-4.0/lib/python/xen/xm/new.py", line 26, in <module>
    from xen.xm.xenapi_create import *
  File "/usr/lib/xen-4.0/bin/../lib/python/xen/xm/xenapi_create.py", line 24, in <module>
    from lxml import etree
ImportError: No module named lxml
=====

The cause is that the current version (2.3-0.1+b2) of python-lxml package in Debian Wheezy available only for Python 2.6 and 2.7. You can safely change python2.5 dependency to python2.6. Also you need to modify /usr/lib/xen-4.0/bin/xm shebang to "#!/usr/bin/python2.6". Works flawlessly.





More information about the Pkg-xen-devel mailing list