Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: No module named gtk

I have a PC running Ubuntu 17.10. I want to runn a python script that uses gtk. HoweverI get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/selectvm.py", line 3, in <module>
    import gtk
ImportError: No module named gtk

I have tried already many things like:

sudo apt install python-gtk2 
sudo apt install python-gtk2-dev

but none of them works. APT says they are already installed.

like image 621
Ruben Avatar asked Oct 28 '22 20:10

Ruben


1 Answers

Try:

sudo apt-get install python-gtk2

These are the python bindings for GTK.

Graphic package nessesary to build the software-center UI.

Or:

sudo apt-get install afnix

credits

like image 168
Tuxonh Avatar answered Oct 31 '22 11:10

Tuxonh