[OpenIndiana-discuss] python-gi in OI?
Alan Coopersmith
alan.coopersmith at oracle.com
Wed Jan 27 00:54:25 UTC 2021
On 1/25/21 10:59 PM, Tony Brian Albers wrote:
> On 01/25/21 04:45 PM, Alan Coopersmith wrote:
>> On 1/25/21 4:24 AM, Tony Brian Albers wrote:
>>> Hi guys,
>>>
>>> I'm trying to get virt-manager to work. But it complains about not being
>>> able to load gi:
>>>
>>> tba at emu:/opt$ virt-manager
>>> Traceback (most recent call last):
>>> File "/usr/bin/virt-manager", line 6, in <module>
>>> from virtManager import virtmanager
>>> File "/usr/share/virt-manager/virtManager/virtmanager.py", line 15,
>>> in <module>
>>> import gi
>>> ModuleNotFoundError: No module named 'gi'
>>> tba at emu:/opt$
>>>
>>>
>>> Does anyone know if we have gi somewhere?
>>
>> The gi python module comes from the pygobject-* packages:
>>
>> https://pkg.openindiana.org/hipster/en/search.shtml?token=pygobject&action=Search
>>
>>
>> -alan-
>
> Thanks Alan,
>
> I tried using python3.5, but now I just get a "Namespace LibvirtGLib not
> available" so it seems that more stuff is missing.
The gi module is used to load gobject-introspection files, which projects based
on glib (like GTK & gnome, but also some non-GUI software) uses to provide
Python bindings to their API's without having to hand craft the bindings
themselves, instead scanning their C or C++ API's, recording that in the gi
files, and autogenerating Python APIs from the gi files.
So I think you'd need to pkg search for "LibvirtGLib.typelib" to see if there's
a matching gobject-introspection file for this library already packaged - there
may not be if the package wasn't built with gobject-introspection to generate
the files. (They usually end up in /usr/lib/amd64/girepository-1.0/ or
/usr/lib/girepository-1.0/ for 32-bit versions.)
-alan-
More information about the openindiana-discuss
mailing list