9

after the debacle a few hours back I managed to get a working desktop after using an ethernet cable and sudo apt-get install ubuntu-desktop

But now when I try to run ubuntu software center from CLI this is what I get

rick@Abigail:~$ sudo software-center 
Traceback (most recent call last):
  File "/usr/bin/software-center", line 34, in <module>
    import gtk
ImportError: No module named gtk

Any guesses how to fix this. The search box on synaptic is also missing. It has something to do with module named axi. I think the both are related.

Rick_2047
  • 373

1 Answers1

12
sudo apt-get install python-gtk2

should fix this. These are the python bindings for GTK, which is a graphical package used to build the GUI for software-center.

axi is something else entirely, try typing

sudo apt-get install afnix

into a terminal and see if that fixes it.

John Lyon
  • 1,031
  • I reinstalled a bunch of python packages, now software center is working but afnix did not solve the axi problem. The search bar that is supposed to be present on top is not there – Rick_2047 Jun 21 '11 at 05:12
  • When you say "It has something to do with module named axi.", what specifically does it tell you? Does running sudo synaptic from the command line throw errors or warnings mentioning axi? Feel free to edit your original question with the detail. – John Lyon Jun 21 '11 at 05:15
  • 1
    Its working now, I reinstalled everything related to axi. – Rick_2047 Jun 21 '11 at 05:25
  • No worries, consider adding what you did as an answer in case other people come across the same problem as you. – John Lyon Jun 21 '11 at 05:29
  • 3
    I still get the "ImportError: No module named gtk" when running fslint-gui, even though I do have python-gtk2 and python-gtk2-dev installed. Suggestions? (I also get the error in the Python interpreter.) – Steve Kroon Jun 09 '15 at 05:45
  • 3
    @SteveKroon this normally happens if you're using multiple versions of python on the same machine - you may need to install python-gtk manually for the python version you're having trouble with. Feel free to open another question if you're still having trouble as I think it's a different issue. – John Lyon Jun 09 '15 at 21:34
  • @jozzas: Yeah, turns out the problem was I have anaconda installed, and then the gtk module is not on the path when fslint-gui launches python with "#!/usr/bin/env python". I did a hacky fix of changing that to specify the system-wide python, but that will break when the fslint package gets a new update, I guess. Would be nice to have a more robust fix. – Steve Kroon Jun 10 '15 at 06:22