Problem with new python (2.4.1) installation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john.coppens@gmail.com

    #1

    Problem with new python (2.4.1) installation

    Hello people.

    After installing python 2.4.1 (previous version 2.3.4), and installing
    pygtk 2.6.2, I get the following error message (almost with any program
    I try to run):

    ImportError: could not import atk

    Trying to start PythonCAD, I also get:

    Traceback (most recent call last):
    File "/usr/local/bin/gtkpycad.py", line 52, in ?
    from PythonCAD.Inter face.Gtk import gtkinit
    File
    "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkinit.py",
    line 48, in ?
    from PythonCAD.Inter face.Gtk import gtkimage
    File
    "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkimage.py",
    line 36, in ?
    from PythonCAD.Inter face.Gtk import gtklayers
    File
    "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtklayers.py",
    line 274, in ?
    class LayerTreeModel( gtk.GenericTree Model):
    AttributeError: 'module' object has no attribute 'GenericTreeMod el'

    I suspect there is a problem with paths somewhere. Can someone help me
    out here?

    John

  • Peter Hansen

    #2
    Re: Problem with new python (2.4.1) installation

    john.coppens@gm ail.com wrote:[color=blue]
    > After installing python 2.4.1 (previous version 2.3.4), and installing
    > pygtk 2.6.2, I get the following error message (almost with any program
    > I try to run):
    >
    > ImportError: could not import atk[/color]
    [snip...][color=blue]
    > "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtklayers.py",
    > line 274, in ?
    > class LayerTreeModel( gtk.GenericTree Model):
    > AttributeError: 'module' object has no attribute 'GenericTreeMod el'
    >
    > I suspect there is a problem with paths somewhere. Can someone help me
    > out here?[/color]

    Without the traceback for the first error I can only suggest that you
    stick a simple print statement in the line of code just before the
    AttributeError is raised, like so:

    print gtk

    The result should show you what path was used to load that particular
    module, and if it is a path problem you can probably figure it out from
    there.

    You haven't created your own modules named "atk" or "gtk" by any chance,
    have you? Or have leftover .pyc or .pyo files with those names, even
    though the .py files are no longer present?

    -Peter

    Comment

    • john.coppens@gmail.com

      #3
      Re: Problem with new python (2.4.1) installation

      >Without the traceback for the first error

      Hello Peter...

      There was no traceback to the first error - in none of the cases the
      error appeared was a traceback present.
      I just found the error - the configuration of pygtk mentioned right in
      the middle somewhere that the atk version wasn't up-to-date, but did
      not signal any error at the end... Installed&compi led a newer atk and
      recompiled pygtk and that part seems ok.

      I'd suggest to the pygtk people to change their message at the end of
      the configure to something like:

      gtk yes
      atk no
      pango yes

      That way there would be a positive indication at the end that something
      was amiss.

      Thanks Peter!
      John

      Comment

      Working...