[SOLVED] virt-manager - No module named gi.repository
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I had virt-manager working great, until I installed pygobject3 from SBo. Now, I am getting the following error upon start up:
Code:
Traceback (most recent call last):
File "/usr/share/virt-manager/virt-manager", line 30, in <module>
from gi.repository import GObject
ImportError: No module named gi.repository
I'm thinking something is not playing nice between pygobject and py3cairo, but I can't quite put my finger on it. I've done some google searches already, but haven't found anything that would work yet. Hopefully someone here can be of better help. Thanks!
Yes, I got all of those already. Everything was working correctly. I have gone through the process of rebuilding virt-manager without success. I'm wondering if I need to rebuild something else.
What version of pygobject3? I seem to recall that the current libvirt version required an update to pygobject3 (which was pushed to SBo, so it should be there, but make sure you have that version).
What version of pygobject3? I seem to recall that the current libvirt version required an update to pygobject3 (which was pushed to SBo, so it should be there, but make sure you have that version).
Currently, I have (3.10.2) of pygobject which is the latest version provided on SBo. I'm running a slightly older version of libvirt, so I'm upgrading that at the moment.
Building pygobject3 from SBo is successful. When I try to build it using the msb git repo (older version), it fails with the following:
Code:
libtool: install: warning: remember to run `libtool --finish /usr/lib64/python3.4/site-packages/gi'
/usr/bin/mkdir -p '/tmp/SBo/package-pygobject3/usr/lib64/python3.4/site-packages/gi'
/usr/bin/ginstall -c -m 644 __init__.py types.py module.py importer.py pygtkcompat.py '/tmp/SBo/package-pygobject3/usr/lib64/python3.4/site-packages/gi'
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "/usr/lib64/python3.4/py_compile.py", line 6, in <module>
import importlib._bootstrap
File "/usr/lib64/python3.4/importlib/__init__.py", line 40, in <module>
import types
File "/tmp/SBo/pygobject-3.8.3/gi/types.py", line 27, in <module>
from . import _gobject
SystemError: Parent module '' not loaded, cannot perform relative import
make[3]: *** [install-pygiPYTHON] Error 1
make[3]: Leaving directory `/tmp/SBo/pygobject-3.8.3/gi'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/tmp/SBo/pygobject-3.8.3/gi'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/pygobject-3.8.3/gi'
make: *** [install-recursive] Error 1
I've tried using the latest version that doesn't require a newer glib. Those compile, but still have same issues with virt-manager.
it seems that you have Python3 installed. I have added a note in the README that if python3 is installed, you will need additional dependencies: gnome-common and py3cairo
I just rebuilt every single dependency and I'm still having the same problem. Where you able to build py3cairo from SBo? I had to remove the second patch file in order to get it to build.
Now that I think about it, I'm going to go ahead and remove python3 and rebuild pygobject3 again.
Ah, it appears that python3 is the culprit. I rebuilt pygobject3 after removing python3, and virt-manager is back to working normally. For some reason, it does not play nice when python3 is installed. I'll do some more testing before marking this thread as solved. Thank you willy for the quick reply as always. Likewise to rworkman.
Indeed, pygobject3 does not like having python3 installed. Well, virt-manager does not like that combination. So, I went ahead and built python3 after building pygobject3. So, I can mark this as solved. Thank you!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.