Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » gtk not importing(gtk not importing)
gtk not importing [message #899696] Wed, 01 August 2012 18:07 Go to next message
Mark Tiddens is currently offline Mark Tiddens
Messages: 2
Registered: August 2012
Junior Member
I am trying to run a Python program in Eclipse that tries to import gtk, but it is not finding gtk (unresolved import). Other Python programs, and this program, work fine otherwise. It does import pygtk just fine, and running the program does display the gtkBuilder gui part of the program just fine (but it is grayed and the buttons, etc. don't work). Also, at the Python command prompt I can import gtk okay (when I downloaded gtk+-bundle-2.24.10-20120208_win32 into /Downloads, I added the bin directory to the PATH, and tested that gtk is found via the Windows command prompt).

So, it seems like Eclipse just isn't finding gtk.
Re: gtk not importing [message #900087 is a reply to message #899696] Fri, 03 August 2012 17:30 Go to previous message
Mark Tiddens is currently offline Mark Tiddens
Messages: 2
Registered: August 2012
Junior Member
I finally found an answer (after 3 days of being stuck): To add gtk (and any other libraries, which are usually in Python27/Lib/site-packages), you need to reset the PyDev interpreter by removing it and re-configuring it: Go to Project, Properties, "PyDev - Interpreter/Grammar", "Click here to configure an interpreter not listed", highlight & Remove python (C:/Python27\Python.exe), Auto Configure (brings up a new list below that you can review and checkmark as needed), then click on OK.
Previous Topic:Serial Version Issue with AspectJ
Next Topic:Request for guidance on creating GUI applications using Eclipse
Goto Forum:
  


Current Time: Sat Jul 26 05:11:12 EDT 2014

Powered by FUDForum. Page generated in 0.02256 seconds