View Full Version : New to programming/Python. Compiling pyGTK error
WalmartSniperLX
March 7th, 2007, 02:40 PM
Hi. Im new to programming (learning with Python) and I just downloaded the pyGTK source and barely got to run the configure script for compiling and I ran into this error :
checking for headers required to compile python extensions... not found
configure: error: could not find Python headers
What do I do at this point?
WalmartSniperLX
March 7th, 2007, 02:46 PM
DARN IT I guess this should have gone in the sub section for compiling :mad: Sorry
WW
March 7th, 2007, 02:59 PM
Installing from the source will give you the latest version, but to get started quickly, you could install the package python-gtk2.
duff
March 7th, 2007, 03:04 PM
You should already have it. Does running # python -c 'import pygtk; print pygtk._get_available_versions()' from your shell work?
WalmartSniperLX
March 7th, 2007, 08:41 PM
It says I already have python-gtk2. Is it the same thing?
The output for:
python -c 'import pygtk; print pygtk._get_available_versions()'
Is:
{'2.0': '/usr/lib/python2.5/site-packages/gtk-2.0'}
po0f
March 7th, 2007, 09:10 PM
WalmartSniperLX,
Yes, a lot of programs in Ubuntu are written using the Python/PyGTK combination. It comes installed standard. :)
duff
March 7th, 2007, 10:46 PM
It says I already have python-gtk2. Is it the same thing?
The output for:
python -c 'import pygtk; print pygtk._get_available_versions()'
Is:
{'2.0': '/usr/lib/python2.5/site-packages/gtk-2.0'}
Great! Now run 'python' and type these commands:
>>> import gtk
>>> w = gtk.Window()
>>> w.set_title('Hello World!')
>>> w.connect('destroy', gtk.main_quit)
>>> w.show()
>>> gtk.main()
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.