pygobject-2.28.6 won't configure: No package 'gobject-introspection-1.0' found, how do I resolve?
CygwinPygobjectPkg ConfigGobjectGobject IntrospectionCygwin Problem Overview
I'm trying to get pygobject-2.28.6 to compile in cygwin (version in repository is 2.28.4 which has some issues). Here is the tail of ./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.
I have gobject-introspection 1.34.2-3 installed. As seen here:
$ whereis gobject-introspection
gobject-introspection: /lib/gobject-introspection /usr/lib/gobject-introspection
and here
$ whereis gobject-introspection-1.0
gobject-introspection-1: /usr/share/gobject-introspection-1.0
I've tried setting GI_CFLAGS and GI_LIBS in configure = to /lib/ and /usr/lib/ (and even /usr/share/) but to no avail. What else can I do to try and resolve this? Thank you for your time!
Cygwin Solutions
Solution 1 - Cygwin
You're probably missing the development package. The package name varies by distribution, but it's the one containing /usr/lib/pkgconfig/gobject-introspection-1.0.pc
(or /usr/lib64/pkgconfig/gobject-introspection-1.0.pc
for some 64-bit distros):
- Fedora, CentOS, RHEL, etc.: gobject-introspection-devel
- Debian, Ubuntu, Mint, etc.: libgirepository1.0-dev
- Arch: gobject-introspection
- FreeBSD: gobject-introspection
- Cygwin: libgirepository1.0-devel
- msys2: mingw-w64-x86_64-gobject-introspection and/or mingw-w64-i686-gobject-introspection
Solution 2 - Cygwin
I got this to compile on cygwin. The package you need is: libgirepository1.0-devel
.
In Ubuntu it's called libgirepository1.0-dev
Solution 3 - Cygwin
I don't have enough rep to comment, so this is really meant to be an addendum to nemequ's answer:
- MSYS2: mingw-w64-x86_64-gobject-introspection and/or mingw-w64-i686-gobject-introspection
Solution 4 - Cygwin
For macOS {mine is(intel cpu)}:
brew install pygobject3 gtk+3
pip install --no-use-pep517 PyGObject
It worked in the python 2.7 virtual environment.