944,078 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 5206
  • Python RSS
Nov 28th, 2005
0

Can't get GTK to work

Expand Post »
I am still trying to take a look at the gtk GUI package and reinstalled the following:
gtk-win32-devel-2.8.6-rc3.exe
and
pygtk-2.8.2-1.win32-py2.4.exe (updated version)

I have it down to a simpler error message now. Here are my warnings and errors with the sample file base.py
Python Syntax (Toggle Plain Text)
  1. Traceback (most recent call last):
  2. File "D:/Python24/Atest/Demo/pyGTK/base.py", line 7, in ?
  3. import gtk
  4. File "D:\Python24\Lib\site-packages\gtk-2.0\gtk\__init__.py", line 37, in ?
  5. from _gtk import *
  6. ImportError: DLL load failed: The specified procedure could not be found.
Also an error box comes up ...
Python Syntax (Toggle Plain Text)
  1. The procedure entry point gdk_cairo_create could not be located in the dynamic link library libgdk=win32-2.0-0.dll
Here is the code for the small sample file from the gtk docs ...
Python Syntax (Toggle Plain Text)
  1. #!/usr/bin/env python
  2.  
  3. # example base.py
  4.  
  5. import pygtk
  6. pygtk.require('2.0')
  7. import gtk
  8.  
  9. class Base:
  10. def __init__(self):
  11. self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
  12. self.window.show()
  13.  
  14. def main(self):
  15. gtk.main()
  16.  
  17. print __name__
  18. if __name__ == "__main__":
  19. base = Base()
  20. base.main()
Does anybody have ideas?
I have a Windows XP box and use Python24.
Last edited by vegaseat; Dec 11th, 2005 at 11:31 am.
Similar Threads
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Dec 27th, 2005
0

Re: Can't get GTK to work

Maybe GTK is only for Linux?
Reputation Points: 404
Solved Threads: 180
Nearly a Posting Virtuoso
bumsfeld is offline Offline
1,422 posts
since Jul 2005
Nov 8th, 2011
0
Re: Can't get GTK to work
I'm trying to do the exact same code and think I have to add the GTK bin and sub folders to the system path. I'm going to try this when i get home later. This website has instructions on how to add a folder to the system path. I'm not sure but maybe you need to add a file named __init__ to each folder?

http://www.mathworks.com/support/solutions/en/data/1-15ZLK/index.html

Also, GTK is not for linux only, but most of the literature is written by and for linux users.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
lunascii is offline Offline
1 posts
since Nov 2011
Nov 8th, 2011
0
Re: Can't get GTK to work
See this explanation about GTK on Windows:
http://www.daniweb.com/software-deve...067#post866067
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Piglatin translator help (Python)
Next Thread in Python Forum Timeline: Replace keys with values and write in a new file Python





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC