Pygtk but no gtk?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chengiz@my-deja.com

    #1

    Pygtk but no gtk?

    I am trying to build an app that requires pygtk so I installed the
    latter. The app does the following:
    import pygtk
    ....
    import gtk

    This crashes with
    ImportError: No module named gtk.

    I dont know where to get this gtk module from. I assumed pygtk would be
    it coz the app doesnt mention any dependency on gtk, also googling
    didnt find anything but pygtk. Did I screw up the installation or
    something? I dont find any gtk.py file in the python library
    directories.

    Thank you.
    Khan

  • Jonathan Smith

    #2
    Re: Pygtk but no gtk?

    chengiz@my-deja.com wrote:
    I am trying to build an app that requires pygtk so I installed the
    latter. The app does the following:
    import pygtk
    ...
    import gtk
    >
    This crashes with
    ImportError: No module named gtk.
    >
    I dont know where to get this gtk module from. I assumed pygtk would be
    it coz the app doesnt mention any dependency on gtk, also googling
    didnt find anything but pygtk. Did I screw up the installation or
    something? I dont find any gtk.py file in the python library
    directories.
    >
    Thank you.
    Khan
    >
    my pygtk provides
    /usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py, which contains
    the gtk module. You should ensure that you have that file, and if not,
    find out where to get it.

    -smithj

    Comment

    • chengiz@my-deja.com

      #3
      Re: Pygtk but no gtk?

      my pygtk provides
      /usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py, which contains
      the gtk module. You should ensure that you have that file, and if not,
      find out where to get it.
      I had the files stored in my local space and my PYTHONPATH was wrong.
      It seems PYTHONPATH should contain both ...lib/python2.x and
      ....lib/python2.x/site-packages while mine was simply ...lib (one'd
      expect them to actually mention this in the documentation). Once I
      fixed PYTHONPATH, it ran fine, although I still cant figure out why it
      got pygtk in the first place coz it wasnt in PYTHONPATH the first time.

      Khan

      Comment

      • Fulvio

        #4
        Re: Pygtk but no gtk?

        *************** ********
        Your mail has been scanned by InterScan MSS.
        *************** ********


        On Saturday 21 October 2006 03:01, Jonathan Smith wrote:
        my pygtk provides
        /usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py, which contains
        the gtk module
        Great advice. I've tried >:
        $ ls /usr/lib/python2.4/site-packages/gtk-2.0
        atk.so dsextras.py dsextras.pyc dsextras.pyo gobject.so gtk
        pangocairo.so pango.so

        So, I found some problem related this, would you please post the content of
        that file?

        NOTE there's one more directory in that position and has its own __init__.

        F


        Comment

        Working...