python pygtk windows 7 64 bit

18,386

Ok for those that are searching for a GUI Python lib to be used in Windows 64 bit here it is!

1) Install from python.org the python 64bit, If you already have python installed on your system, you wont need to worry about this. http://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi

2)Add to your PATH in the advanced settings/environment variables ;C:\python27

3)Then download the all in one installer from GTK+ http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip

4)create a folder that is in c:\opt\gtk # it doesn't really matter where you'll just have to add it to PATH. unzip the folder and copy all the files to the the file created above. then, set your PATH to the file created E.G ;C:\opt\gtk\bin

You can test it now in cmd by typing: "gtk-demo"

5)Now you still have to get the libraries gtk,PyCairo,goobject http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygtk

py2cairo-1.10.0.win-amd64-py2.7.‌exe

pygobject-2.28.6.win-amd64-py2.7.‌exe

pygtk-2.22.0.win-amd64-py2.7.‌exe

I hope it helps. I saw a file "py2cairo-1.10.0.win-amd64-py2.7.‌exe" I am not certain if this is needed I am currently testing my applications. Now I just need to find gtksourceview2/3 for win7 64bit. Good Luck! ;)

Share:
18,386
LUser
Author by

LUser

Updated on June 27, 2022

Comments

  • LUser
    LUser almost 2 years

    I have been working with pygtk on linux for some time.I just want to make my app more distributable. Now I have used pygtk for 32 bit, but now I'd like to use pygtk for 64bit using pygtk 64bit. I have downloaded the all in one installer. I have changed my path as gtk would want and run the "pkg-config --cflags gtk+-2.0" command then ran the gtk-demo command and it did give me a demo and that works perfectly! Just I am missing someting because there in still no module named 'gtk' in my python gtk 64 bit.

    I want to make the 64 bit version of gtk work on windows and when I get a fix I want to post on Youtube on how to make it work for others.

    Thank you, I hope someone can help cause the documentation is lacking on this part.

  • cgohlke
    cgohlke about 11 years
    Don't use pycairo-1.10.0.win-amd64-py2.7.‌exe (not compatible with PyGTK!) but py2cairo-1.10.0.win-amd64-py2.7.‌exe (uses cairo from GTK).
  • ThorSummoner
    ThorSummoner almost 10 years
    is it worthwhile to link directly to the binaries to download for all prerequisites?
  • LUser
    LUser almost 10 years
    Maybe, but you can just CTRL+F and just find them. I just wanted those that maybe are using 2.6 or 2.7 to be able to use the right binary for their interpreter.
  • Mike S
    Mike S almost 10 years
    I was stuck for a while with conflicting DLLs. The solution was stupidly simple... had to move the GTK (ex: C:\gtk\bin) to the beginning of my environment variables/PATH.
  • swdev
    swdev over 9 years
    Thanks for the sum up! Give a speed start on doing PyGtk. Just notice that there is no pycairo-1.10.0.win-amd64-py2.7.‌exe anymore.
  • CrandellWS
    CrandellWS over 8 years
    Nothing else I have found works for win64 the installers are whl files now so use pip install <filename>.whl see -> lfd.uci.edu/~gohlke/pythonlibs/#pygtk and to install see -> pip.pypa.io/en/latest/user_guide.html#installing-from-wheels
  • Pragyaditya Das
    Pragyaditya Das over 7 years
    For people having difficulty in finding the above mentioned .exe files. Go to this link : github.com/SpiNNakerManchester/SpiNNakerManchester.github.io‌​/…