Results 1 to 4 of 4

Thread: python problem: "ImportError: No module named gtk"

  1. #1
    Join Date
    Nov 2010
    Location
    Merlin, Oregon, USA
    Beans
    31

    Arrow python problem: "ImportError: No module named gtk"

    Greetings all,

    Recently I tried to launch gufw, otherwise known as the Firewall Configuration application. Nothing happened when I launched it, so I launched it from a terminal:

    rob@teeny:~$ gufw
    from instance import Check
    File "/usr/share/gufw/instance.py", line 18, in <module>
    import gtk
    ImportError: No module named gtk

    It seems that I have a Python problem. I ran the Update Manager, and my system is up-to-date. (I'm running Maverick Meerkat Netbook Edition.)

    Then I remembered that I tried to install Python 2.5.5 from source a couple months ago, in order to run the game FreeOrion. (I never did get FreeOrion working, but the problem was with OpenGL and my graphics adapter.)

    So I don't remember if I was successful in installing Python 2.5.5 because it was a while ago. I'm afraid that my Python installation is broken because of my tinkering.

    If someone could help me fix my Python installation, I would be very grateful!

    - Rob

  2. #2
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,666
    Distro
    Ubuntu Gnome Development Release

    Re: python problem: "ImportError: No module named gtk"

    Please post the complete outputs of these commands.

    Code:
    sudo dpkg --configure -a
    Code:
    sudo apt-get install -f

  3. #3
    Join Date
    Sep 2006
    Beans
    1,171
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: python problem: "ImportError: No module named gtk"

    Hello,

    in case you see that you have to get rid of many packages due to the fact that the two versions conflict with each other, while you are trying to reinstall or reconfigure packages, do not hurry to remove some if proposed.

    I had messed the installation of python myself and this is how I was able to solve my problem. Do not know if this might ruin the execution of the game though...
    http://ubuntuforums.org/showthread.php?t=1084491

    Regards!

  4. #4
    Join Date
    Nov 2010
    Location
    Merlin, Oregon, USA
    Beans
    31

    Re: python problem: "ImportError: No module named gtk"

    Sikander and Claus, thank you very much for your help! I also reported this problem as a Ubuntu question for the gui-ufw package here:
    https://answers.launchpad.net/ubuntu...uestion/142613

    They were able to point me in the right direction. I had installed Python 2.5.5 from source code a while ago, and that installation was causing the problem. The solution in my case was to manually remove the installation of Python 2.5.5.

    Thanks again! It makes me happy to be part of such a helpful community.

    - Rob

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •