jeffreywildman / homebrew-virt-manager

A set of homebrew formulae to install virt-manager and virt-viewer on MAC OSX
1.01k stars 266 forks source link

Fresh install on 2 Macs both get: ImportError: No module named libxml2 #115

Closed jamespoore closed 5 years ago

jamespoore commented 5 years ago

Hi,

Found this repo looking for exactly this tool so was stoked to try it. Installed on my home Mac and when running virt-manager I get this:

12:57 $ virt-manager Traceback (most recent call last): File "/usr/local/Cellar/virt-manager/1.5.1_5/libexec/share/virt-manager/virt-manager", line 35, in <module> from virtinst import util as util File "/usr/local/Cellar/virt-manager/1.5.1_5/libexec/share/virt-manager/virtinst/__init__.py", line 41, in <module> from virtinst.uri import URI File "/usr/local/Cellar/virt-manager/1.5.1_5/libexec/share/virt-manager/virtinst/uri.py", line 24, in <module> from .cli import parse_optstr_tuples File "/usr/local/Cellar/virt-manager/1.5.1_5/libexec/share/virt-manager/virtinst/cli.py", line 40, in <module> from .clock import Clock File "/usr/local/Cellar/virt-manager/1.5.1_5/libexec/share/virt-manager/virtinst/clock.py", line 20, in <module> from .xmlbuilder import XMLBuilder, XMLChildProperty, XMLProperty File "/usr/local/Cellar/virt-manager/1.5.1_5/libexec/share/virt-manager/virtinst/xmlbuilder.py", line 28, in <module> import libxml2 ImportError: No module named libxml2

That was a fresh install of OS X but I thought you never know, I could have done something, so tried to install on my work Mac, and get the exact same error.

brew list ... libxml2 ...

Installed deps: 12:45 $ brew install virt-manager virt-viewer ==> Installing virt-manager from jeffreywildman/virt-manager ==> Installing dependencies for jeffreywildman/virt-manager/virt-manager: intltool, libcroco, librsvg, adwaita-icon-theme, dbus, gsettings-desktop-schemas, libepoxy, gtk+3, gtk-vnc, check, glib-networking, libpsl, webp, gd, libtool, graphviz, vala, libsoup, libxml2, libosinfo, yajl, libvirt, libvirt-glib, libarchive, osinfo-db-tools, osinfo-db, ninja, meson, py3cairo, pygobject3, autoconf, bdw-gc, guile, autogen, automake, lz4, opus, spice-protocol, usbredir, gstreamer, libogg, libvorbis, orc, theora, gst-plugins-base, gst-libav, flac, speex, libshout, libvpx, taglib, gst-plugins-good, faac, faad2, libmms, gst-plugins-bad, lame, x264, gst-plugins-ugly, spice-gtk and vte3

Any suggestions? 2 Macs suggests there is something else arwy or missing.

Thanks

amnonbb commented 5 years ago

Me happened same thing after brew upgrade and libxml2 version is updated..

lstarnes1024 commented 5 years ago

It looks like libxml2 no longer includes python 2.7 modules. This is probably a good opportunity to update virt-manager to 2.0, which switches to python 3.

amnonbb commented 5 years ago

libxml2: move to Python 3

Workaround is rollback this commit and reinstall virtual-manager

ichbinder commented 5 years ago

I have the same problem.

jeffreywildman commented 5 years ago

Updated virt-manager recipe to 2.0.0, fingers crossed.

jamespoore commented 5 years ago

Works a treat, thank you for the prompt resolution!