How to use gexiv2 in python?

I just compiled exiv2 and gexiv2 for my debian machiene, and now I want to get started with gexiv2 to edit IPTC data using python. The following line of code is presented on the gexiv2 website:

from gi.repository import GExiv2 

But this already leads to:

 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named gi.repository 

I can't even import gi, so I think I'm missing another package !? What do I need to do to make this work expected?

UPDATE: I updated my OS to the latest version of debian. Now I can import gi, but I'm still having problems with GExiv2.

When importing GExiv2:

The following error occurs:
 >>>from gi.repository import GExiv2 ERROR:root:Could not find any typelib for GExiv2 
+6
source share
3 answers

Hi, I had the same problem, I fixed it by installing gir1.2-gexiv2-0.4

+3
source

I believe you need the python3-gi package or, if you are using Python 2, python-gi .

+1
source

Same problem here, I solved it by installing gir1.2-gexiv2-0.4 and python-gobject

0
source

Source: https://habr.com/ru/post/955163/


All Articles