I'm trying to install PyGObject on a RH Linux system, using the command
python3 /usr/local/bin/pip3.6 install PyGObject
But it dies with the ff. error msg:
Package cairo-gobject was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo-gobject.pc'
to the PKG_CONFIG_PATH environment variable
I think the cairo-gobject should already have been installed, and I would gladly tell pip where to look for cairo-gobject.pc
--if only I knew. But I don't have a clue where it is.
I'm generally following the instructions for installing PyGObject on Fedora systems, although a lot of things seem to have changed since that write-up. For example, using yum
instead of dnf
. Also, following the instructions, I initially did
yum install cairo-devel
But yum search
revealed that there are actually two such packages: cairo-devel.i686 and cairo-devel.x86_64. It's not clear to me which one was actually installed, nor whether yum automagically selects the right one.
And while our system interprets python
as python2
, we also have python3
installed, and we need to use this program I'm trying to install with v3. So instructions for calling pip
, python
etc. need to be modified to use Python3. I think I've done that everywhere, although it's of course possible that I goofed, and cairo-gobject is somewhere that only P2 knows.
Packages I've installed: gcc, gobject_introspection-devel, cairo-devel, pkg-config, python3-devel, python36-devel, python36-setuptools, gtk3, pycairo. But still, when I try to do
python3 /usr/local/bin/pip3.6 install PyGObject
it dies (as I said above) with Package cairo-gobject was not found in the pkg-config search path.
What lack I yet? Where might I look for this cairo-gobject.pc
thing? I know that cairo.pc is under /usr/lib64/pkgconfig/, but cairo-gobject.pc is nowhere under /usr/. Where else might it be?
Last Minute: While making sure I'd dotted every 'i' before posting, I noticed a 't' I'd forgotten to cross, namely a msg I'd overlooked while trying to install PyGObject:
Building wheel for PyGObject (PEP 517) ... error
But the build goes on past that error (that's my excuse for missing it before), until it finally quits with the above-referenced message about cairo-gobject.pc. There's some discussion about this PEP517-related issue here, but I don't see a resolution. Or if there is, I don't know how to apply it.
I had the same issue -- indeed, cairo-gobject-devel does it, as Uli suggested.