TransWikia.com

Ubuntu 20.04 ImportError: No module named gtk.glade

Ask Ubuntu Asked by Kyeiv on February 10, 2021

i am trying to launch an old python2 script. On ubuntu 18.04 i installed python-glade2 and it worked, unfortunately ubuntu 20.04 doesn’t have it in repositories. Is there a way to get this gtk.glade module? Maybe some other library that provides it?

@edit:
after following N0rbert’s suggestions gtk/glade are installed but, unfortunately I also need python-gdal which I was trying to install in a similiar way and got error:

The following packages have unmet dependencies. python-gdal : Depends: gdal-abi-2-2-3 but it is not installable Depends: libgdal20 (>= 2.2.2) but it is not installable E: Unable to correct problems, you have held broken packages.

I assume that some packages from Ubuntu 20 that i need conflicts with the ones from ubuntu 18.

output of apt-cache policy python-gdal libgdal20:

python-gdal: Installed: (none) Candidate: (none) Version table: libgdal20: Installed: (none) Candidate: (none) Version table:

I am wondering if downloading .debs from ubuntu 18, then extracting only .py files and copying them into script directory is an only option here –

One Answer

The python-gtk2 with python-glade2 may be installed manually using packages from 18.04 LTS by the commands below:

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
sudo apt-get install ./python-gtk2_2.24.0-5.1ubuntu2_amd64.deb

wget -c http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-glade2_2.24.0-5.1ubuntu2_amd64.deb
sudo apt-get install ./python-glade2_2.24.0-5.1ubuntu2_amd64.deb

Answered by N0rbert on February 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP