Score:2

"No package 'pygtk-2.0' found" on Ubuntu 20.04 even after installing python-gtk2 from archives

az flag

I am trying to install blueman which seems to have pygtk-2.0 as a dependency. When doing ./configure, it stops here:

configure: error: Package requirements (pygtk-2.0 >= 2.12.0) were not met:

No package 'pygtk-2.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 PYGTK_CFLAGS and PYGTK_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

Since python-gtk2 is not available through apt, I installed it manually from a package as described here.

Then tried configuring blueman again, but I still get the same error.

Am I missing something?

user535733 avatar
cn flag
Looking at https://packages.ubuntu.com/focal/blueman, I see only Py3 packages as dependencies.
Score:3
zw flag

The needed pygtk-2.0.pc file was last available for Ubuntu 18.04 LTS and came from python-gtk2-dev package.

So you have to download and install this development package with dependencies manually by using commands below:

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2-dev_2.24.0-5.1ubuntu2_all.deb

sudo apt-get update
sudo apt-get install ./python-gtk2-dev_2.24.0-5.1ubuntu2_all.deb  ./python-gtk2_2.24.0-5.1ubuntu2_amd64.deb

and then check its registration by pkg-config --list-all | grep pygtk-2.0 .

Also please note that modern Gtk3.0 based version of BlueMan exists in official universe pocket for Ubuntu 20.04 LTS. You can install BlueMan as simple as

sudo apt-add-repository universe
sudo apt-get install blueman
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.