Problem with new python (2.4.1) installation

Peter Hansen peter at engcorp.com
Fri Aug 5 22:14:40 EDT 2005


john.coppens at gmail.com wrote:
> 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
[snip...]
> "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtklayers.py",
> line 274, in ?
>     class LayerTreeModel(gtk.GenericTreeModel):
> AttributeError: 'module' object has no attribute 'GenericTreeModel'
> 
> I suspect there is a problem with paths somewhere. Can someone help me
> out here?

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



More information about the Python-list mailing list