LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-26-2014, 08:53 PM   #1
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Rep: Reputation: 249Reputation: 249Reputation: 249
Exclamation virt-manager - No module named gi.repository


Greetings!

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!
 
Old 07-26-2014, 09:16 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,738

Rep: Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850
why not installing it back again?
 
Old 07-26-2014, 09:18 PM   #3
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
Quote:
Originally Posted by willysr View Post
why not installing it back again?
Which one? Virt-manager? I have. I've tried both the latest stable and git version. No changes. I'm having a hard time pinpointing what broke it.
 
Old 07-26-2014, 09:35 PM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,738

Rep: Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850
pygobject3 is required

Here's a list of deps that are needed to build virt-manager (from sbopkg):
Code:
vte3
vala
spice-protocol
pyparsing
celt051                       
spice                          
libcacard
spice-gtk
gtk-vnc
pygobject3
urlgrabber
ipaddr-py
tunctl
gnome-python2-gconf
yajl
libvirt
libvirt-python
libvirt-glib
virt-manager
 
1 members found this post helpful.
Old 07-26-2014, 10:00 PM   #5
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
Quote:
Originally Posted by willysr View Post
pygobject3 is required

Here's a list of deps that are needed to build virt-manager (from sbopkg):
Code:
vte3
vala
spice-protocol
pyparsing
celt051                       
spice                          
libcacard
spice-gtk
gtk-vnc
pygobject3
urlgrabber
ipaddr-py
tunctl
gnome-python2-gconf
yajl
libvirt
libvirt-python
libvirt-glib
virt-manager
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.
 
Old 07-26-2014, 10:07 PM   #6
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,738

Rep: Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850
I mean reinstall pygobject3 as it's a dep of dep for virt-manager
 
Old 07-26-2014, 10:15 PM   #7
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
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.
 
Old 07-26-2014, 10:16 PM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,560

Rep: Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354Reputation: 1354
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).

Also, for usb passthrough to work, you need a newer libusb than what's in Slackware 14.1 -- get it here: http://www.slackware.com/~rworkman/libusb/
 
Old 07-26-2014, 10:26 PM   #9
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
Quote:
Originally Posted by rworkman View Post
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).

Also, for usb passthrough to work, you need a newer libusb than what's in Slackware 14.1 -- get it here: http://www.slackware.com/~rworkman/libusb/
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.
 
Old 07-26-2014, 11:01 PM   #10
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,738

Rep: Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850
is this a stable (14.1) or current machine?
 
Old 07-26-2014, 11:04 PM   #11
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,738

Rep: Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850
Quote:
Originally Posted by stormtracknole View Post
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
 
2 members found this post helpful.
Old 07-26-2014, 11:34 PM   #12
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,738

Rep: Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850Reputation: 1850
Just upgraded pygobject3 to 3.10.2 to sync with SBo on MSB repository
 
Old 07-26-2014, 11:52 PM   #13
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
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.
 
Old 07-26-2014, 11:57 PM   #14
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
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.
 
1 members found this post helpful.
Old 07-27-2014, 12:06 AM   #15
stormtracknole
Senior Member
 
Registered: Aug 2005
Distribution: Slackware, RHEL
Posts: 1,271

Original Poster
Rep: Reputation: 249Reputation: 249Reputation: 249
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!
 
  


Reply

Tags
gobject, virt-manager


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Python: ImportError: No module named gi.repository Skyer Programming 1 12-31-2011 07:43 AM
LXer: Hacking libvirt/virsh/virt-manager/virt-install at Xen 4.0 Dom0 on top of Ubunt LXer Syndicated Linux News 0 05-06-2010 02:50 PM
LXer: Virt-install&Virt-manager at Xen 4.0-rc8 (2.6.32.10 pvops) Dom0 on top Ubuntu K LXer Syndicated Linux News 0 03-26-2010 09:41 PM
Debian 5.0 Network-Manager interfers with vnet0 bridging to eth0 for virt-manager coolphive Debian 5 05-29-2009 02:02 PM
Debian 5.0 Network-Manager interfers with vnet0 bridging to eth0 for virt-manager coolphive Linux - Newbie 2 05-28-2009 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration