Puppy Linux - import gtk throws error in Python
I am using Linux version 2.6.24.16. I believe it is using Puppy Linux 4.2. I am actually using Puppy Arcade, which is a specialized branch. Their help file hints that it is 4.2, however.
I am using Python 2.6.4 which I installed through a puppy package released here: http://code.google.com/p/puppy-development/downloads/detail?name=Python%2B-2.6.4-i486.pet&can=2&q=
The package claims to have the pygtk, and it is true that I have no issues telling python to import pygtk
However, as soon as I attempt import gtk
it throws the following error:
>>> import gtk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 38, in <module>
import gobject as _gobject
File "/usr/lib/python2.6/site-packages/gtk-2.0/gobject/__init__.py", line 26, in开发者_Go百科 <module>
from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
File "/usr/lib/python2.6/site-packages/gtk-2.0/glib/__init__.py", line 22, in <module>
from glib._glib import *
ImportError: /usr/lib/python2.6/site-packages/gtk-2.0/glib/_glib.so: undefined symbol: g_assertion_message
I wish I could tell you what version of pygtk
I am using, but it seems that information is stored inside of the gtk
I am unable to import.
It looks like pygtk package you are trying to use is compiled against newer glib (and, possibly gtk+) libraries. Just from observation (I'm not puppy user) it looks like you've downloaded pygtk package for 4.3 (with possible newer runtime libraries).
精彩评论