Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use gexiv2 in python?

I just compiled exiv2 and gexiv2 for my debian machiene and now I want to start working with gexiv2 to edit IPTC data using python. The gexiv2 website presents the following line of code:

from gi.repository import GExiv2

But that already results in:

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 have to do to make this work as expected?

UPDATE: I upgraded my OS to the newest debian version. I can import gi now, but I'm still having trouble with GExiv2.

The following error occurs when importing GExiv2:

>>>from gi.repository import GExiv2
ERROR:root:Could not find any typelib for GExiv2
like image 228
JasonTS Avatar asked Oct 03 '13 04:10

JasonTS


2 Answers

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

like image 138
Foo Bar User Avatar answered Sep 30 '22 18:09

Foo Bar User


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

like image 28
nemequ Avatar answered Sep 30 '22 19:09

nemequ