pygobject-2.28.6将无法配置:找不到包“gobject-introspection-1.0”,如何解决?

时间:2013-08-02 20:37:54

标签: cygwin pygobject pkg-config gobject gobject-introspection

我正在尝试使用pygobject-2.28.6在cygwin中编译(存储库中的版本是2.28.4,这有一些问题)。这是./configure的尾部:

checking for GLIB - version >= 2.24.0... yes (version 2.34.3)
checking for ffi... checking for FFI... yes
checking for GIO... yes
checking for GIOUNIX... yes
checking for GI... no
configure: error: Package requirements (glib-2.0 >= 2.24.0
        gobject-introspection-1.0 >= 0.10.2
    ) were not met:

No package 'gobject-introspection-1.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GI_CFLAGS
and GI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

我安装了gobject-introspection 1.34.2-3。如下所示:

$ whereis gobject-introspection
gobject-introspection: /lib/gobject-introspection /usr/lib/gobject-introspection

在这里

$ whereis gobject-introspection-1.0
gobject-introspection-1: /usr/share/gobject-introspection-1.0

我尝试在configure = to / lib /和/ usr / lib /(甚至/ usr / share /)中设置GI_CFLAGS和GI_LIBS,但无济于事。我还能做些什么来尝试解决这个问题?谢谢你的时间!

4 个答案:

答案 0 :(得分:47)

您可能错过了开发包。包名称因分发而异,但它包含/usr/lib/pkgconfig/gobject-introspection-1.0.pc(或某些64位发行版的/usr/lib64/pkgconfig/gobject-introspection-1.0.pc):

  • Fedora,CentOS,RHEL, gobject-introspection-devel
  • Debian,Ubuntu,Mint,等。 libgirepository1.0-dev
  • Arch: gobject-introspection
  • FreeBSD: gobject-introspection
  • Cygwin: libgirepository1.0-devel
  • msys2: mingw-w64-x86_64-gobject-introspection 和/或 mingw-w64-i686-gobject-introspection

答案 1 :(得分:12)

我在cygwin上编译了这个。您需要的套餐是:libgirepository1.0-devel

在Ubuntu中,它被称为libgirepository1.0-dev

答案 2 :(得分:2)

我没有足够的代表发表评论,所以这真的是nemequ答案的附录:

  • MSYS2: mingw-w64-x86_64-gobject-introspection 和/或 mingw-w64-i686-gobject-introspection

答案 3 :(得分:0)

对于 macOS {mine is(intel cpu)}:

 brew install pygobject3 gtk+3
 pip install --no-use-pep517 PyGObject

它在 python 2.7 虚拟环境中工作。