Re: Cannot get goocanvas on Fedora 26 to work using pygobject



On Sat, 2017-08-12 at 20:25 +0200, Fred van Zwieten wrote:
Hi,


I am trying to get goocanvas to work on Fedora 26 but I only get it to
work with PyGTK, but not with pygobject.


Packages installed:
python3-gobject.x86_64 : Python 3 bindings for GObject Introspection
gobject-introspection.x86_64 : Introspection system for GObject-based
libraries
pygoocanvas.x86_64 : GooCanvas python bindings


with pip and pip3 pgi is installed

import gi
gi.require_version('Gtk','3.0')
from gi.repository import GooCanvas
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 879, in _find_spec
AttributeError: 'DynamicImporter' object has no attribute 'find_spec'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.6/site-packages/gi/importer.py", line 127,
in find_module
    'introspection typelib not found' % namespace)
ImportError: cannot import name GooCanvas, introspection typelib not
found

That looks like the problem. The introspection library should be in
/usr/lib64/girepository-1.0 (in Fedora 21 it is).
Try doing: rpm -ql goocanvas2

I don't know python very well so can't help much more.

Damon





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]