Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在python中使用gexiv2?_Python_Pygobject_Gobject_Exiv2_Pyexiv2 - Fatal编程技术网

如何在python中使用gexiv2?

如何在python中使用gexiv2?,python,pygobject,gobject,exiv2,pyexiv2,Python,Pygobject,Gobject,Exiv2,Pyexiv2,我刚刚为我的debian machiene编译了exiv2和gexiv2,现在我想开始使用gexiv2使用python编辑IPTC数据。gexiv2网站提供以下代码行: from gi.repository import GExiv2 但这已经导致: Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named gi.reposi

我刚刚为我的debian machiene编译了exiv2和gexiv2,现在我想开始使用gexiv2使用python编辑IPTC数据。gexiv2网站提供以下代码行:

from gi.repository import GExiv2
但这已经导致:

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

我相信您需要的软件包是,或者,如果您使用的是Python 2,。

嗨,我也遇到了同样的问题,我通过安装
gir1.2-gexiv2-0.4
解决了同样的问题,我在这里安装了gir1.2-gexiv2-0.4和Python gobject

,这在我的报告中不存在。根据debian网站的说法,它包含的pygi wich已经被删除了,现在应该是gobject的一部分,但是我已经安装了gobject。这两个包都是为current stable(wheezy)而存在的。我将添加链接。我升级到了最新的debian版本,但现在出现了以下错误:错误:root:找不到GExiv2Does
$(pkg config--variable=typelibdir-gobject-introspection-1.0)/GExiv2.typelib
是否存在?查看packages.debian.org上的libgexiv2软件包,他们的debian软件包似乎已损坏,既不包含GIR也不包含typelib,这意味着您应该提交一个bug,如果您想尽快让它工作,请从源代码处安装libgexiv2,绕过debian的包管理系统。如果我在控制台中键入您给我的行,我会得到:“/usr/lib/girepository-1.0/GExiv2.typelib:没有这样的文件或目录”。我试着自己编译,但有两个版本会导致其他问题。如何将debian版本与我自己的版本交换?我不能只卸载它,因为它也想删除侏儒。我也想把它归档,但我真的不知道怎么归档。debian的reportbug工具真的很差劲,因为它需要很多像我这样的新手不知道的东西。对我来说,它可以从Ubuntu手动安装软件包(我使用debian sid)。
>>>from gi.repository import GExiv2
ERROR:root:Could not find any typelib for GExiv2