Problem with new python (2.4.1) installation

J

john.coppens

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.Interface.Gtk import gtkinit
File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkinit.py",
line 48, in ?
from PythonCAD.Interface.Gtk import gtkimage
File
"/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkimage.py",
line 36, in ?
from PythonCAD.Interface.Gtk import gtklayers
File
"/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?

John
 
P

Peter Hansen

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
 
J

john.coppens

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&compiled 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top