Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Python plugin support in GIMP?

59 views
Skip to first unread message

John Corliss

unread,
Apr 8, 2009, 1:08:53 PM4/8/09
to
I was trying to install The GIMP (Windows version, I'm running XP Home
SP3) 2.6.6 this morning and during the process, learned that I needed
Python:

http://www.python.org/

and a GUI for it named PyGTK+:

http://www.pygtk.org/

if I want The GIMP to support plugins written in Python.

There are two versions of Python available, 2.6.1 and 3.0.1. The latter
isn't backwardly compatible with the former, as stated on this page:

http://docs.python.org/3.0/whatsnew/3.0.html

Can anybody tell me which version I should use?

Then the PyGTK site says:

"In order to install PyGtk in windows, you need to install the Python
(http://www.python.org/download/) and the GTK+ runtime
(http://sourceforge.net/project/showfiles.php?group_id=98754), you can
find more detailed instructions on the PyGTK FAQ
(http://faq.pygtk.org/index.py?req=show&file=faq21.001.htp)."

1. Which of these downloads should I go for:

http://sourceforge.net/project/showfiles.php?group_id=98754

"21.1. How do I get PyGTK running on MS Windows?"

Maybe it's just not worth it. Do I really need to worry about plugins
written in Python? I read somewhere that if I don't set up The GIMP with
this capability from the start, I'll have to reinstall it from scratch
if I decide I want it later. It sounds like doing all this might create
some problems in the future when updates are made available.

What a clusterf**k.

--
John Corliss

Jernej Simončič

unread,
Apr 8, 2009, 2:55:47 PM4/8/09
to
on Wed, 08 Apr 2009 10:08:53 -0700, John Corliss wrote:

> Can anybody tell me which version I should use?

This is answered in the FAQ: http://gimp-win.sourceforge.net/faq.html#py

--
begin .sig
< Jernej Simončič ><>◊<>< jernej simoncic at isg si >
end

John Corliss

unread,
Apr 8, 2009, 4:05:50 PM4/8/09
to
Jernej Simončič wrote:
> John Corliss wrote:
>
>> Can anybody tell me which version I should use?
>
> This is answered in the FAQ: http://gimp-win.sourceforge.net/faq.html#py

Thanks very much for the info! 80)>

--
John Corliss

rich

unread,
Apr 9, 2009, 4:36:32 AM4/9/09
to

Hi John, its me again still harping about gimp.

I had to install python on my windows version of gimp last year purely
for the "separate-layers" plugin. At the time I was using gimp 2.4.x and
I came across a package called "gimp-python easy" which had everything
included. Pulled this from my archive:

gtk-2.10.11-win32-1.exe
pycairo-1.2.6-1.win32-py2.5.exe
pygobject-2.12.3-1.win32-py2.5.exe
pygtk-2.10.6-1.win32-py2.5.exe
python-2.5.2.msi
IDIOTS NEVER READ THIS.txt

Just had a quick search and I don't know where it came from, but if you
have any problems and want to try it, let me know and I can pop it onto
my rapidshare account.

--
rich

John Corliss

unread,
Apr 9, 2009, 6:44:06 AM4/9/09
to

Thanks Rich. The text file is probably worth having, but I think it
might be a good idea if I used the most current versions of most of the
other stuff (the exception being that I'd want to use 2.6 of Python
rather than version 3.)

This page gives a good reason to install Python plugin support:

http://registry.gimp.org/node/186

"The Python version now has live previewing! With the "Preview" checkbox
active, the preview now updates automatically every time you change a
setting!"

IOW, the non-Python version of the Layer Effects GIMP plug-in
("Script-Fu") doesn't do live previews.

By the way, this site:

http://www.smashingmagazine.com/2009/04/03/8-handy-tweaks-to-make-gimp-replace-photoshop/

makes the following recommendation:

"If the loose docks in GIMP bother you, affix them to the main window by
right-clicking on the dock or toolbar and selecting Always on Top. The
toolbars will now stay above the main menu, and the application will
work as if the docks were locked within the main window."

For some reason, right-clicking on the dock or toolbar, any toolbar,
doesn't produce a context menu in my copy of GIMP so I'm unable to
implement the suggestion.

--
John Corliss

rich

unread,
Apr 9, 2009, 7:30:12 AM4/9/09
to

Finally found the link to the gimp-python easy which is:

http://photocomix-resources.deviantart.com/art/Gimp-Python-support-
easier-74889017 watch out for line wraps

and has been updated a little from the list I posted. Apparently there
can be problems installing the latesst versions as some of the packages
will not work with others. As you say the "only idiots..." is worth
having as it gives a run-down on how-to-install.

As for the right click - always on top - AFAIK this is a linux function
and does not apply to windows, however the version I use on windows,
based on gimp 2.6.5 from portable apps, has the tools dock in the
foreground anyway, the main window, any images etc are under it. Cant see
any way of controlling this.

--
rich

John Corliss

unread,
Apr 9, 2009, 2:57:02 PM4/9/09
to

"NOTE
since windows user as me will never read something called " READ ME"
before install something, how to is included in a file called
"IDIOTS NEVER READ THIS.txt"...so if you fail to read it, you are just
insulting yourself, don't complain with me

Happy Gimping"

LOL. Clever way to put things.

> and has been updated a little from the list I posted. Apparently there
> can be problems installing the latesst versions as some of the packages
> will not work with others. As you say the "only idiots..." is worth
> having as it gives a run-down on how-to-install.
>
> As for the right click - always on top - AFAIK this is a linux function
> and does not apply to windows, however the version I use on windows,
> based on gimp 2.6.5 from portable apps, has the tools dock in the
> foreground anyway, the main window, any images etc are under it. Cant see
> any way of controlling this.

ACKK!!! You're right, of course. I should have noticed that this was the
default behavior. Also, I suspected it was a Linux function to be able
to set the "On Top" thing.

Thanks for your help, Rich. I very much appreciate the time you've spend
giving it.


--
John Corliss

John Corliss

unread,
Apr 9, 2009, 3:31:06 PM4/9/09
to

So here's that text file, heavily edited by yours truly for clarity:
____________________________________________________________________________
WHAT'S INSIDE: Everything needed to install Python plug-in support for
GIMP in Windows and instructions (below) for how to install everything.

1. This pack is dated 18/1/2008. I suggest you check the links listed
below to see if new versions of the included components are
available.

2. Be sure to read the instructions below all the way through before
following them. They're easy to follow, but if you skip some steps
(mainly restarting the computer when indicated), you may fail.

3. It's necessary (as I write this) to uninstall/reinstall
Gimp because currently, it's impossible to add Python to an already
installed GIMP; you must have Python and some other stuff set up on
your computer before installing GIMP if you want Python plug-in
support..

How to Install

You'll find everything needed in the .zip you downloaded, but I'm also
providing the official download links for all the components in case you
want to check for more recent versions. The packages included are the
latest versions as I write this (18/1/2008), but you might also want to
use the links to have a look at the related source codes.

Here are the steps:

1. Uninstall all previous failed attempts and uninstall GIMP if you
already have it installed.

2. Download and install Python 2.5.1:

http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi

3. Restart your computer.

4. Download and install the GTK+ Runtime Environment:


http://garr.dl.sourceforge.net/sourceforge/gladewin32/gtk-2.10.11-win32-1.exe

5. Download and install PyCairo:


http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.2/pycairo-1.2.6-1.win32-py2.5.exe


6. Download and install PyGobject:


http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.12/pygobject-2.12.3-1.win32-py2.5.exe

7. Download and install PyGTK:


http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.10/pygtk-2.10.6-1.win32-py2.5.exe

8. Restart your computer.

9. Check to see that all this is working by using the Python console to
display a window:

http://www.imageox.com/image/119854-PythonCons.png

10. Download and install GIMP.

http://downloads.sourceforge.net/gimp-win/gimp-2.4.1-i686-setup.exe

11. Start the program (GIMP), select the "Customize" button and put a
tick in the GIMP Python extension check box.
__________________________________________________________________________

Number 11. is a little unclear to me, because AFAICS there isn't any
"Customize" button in GIMP.

--
John Corliss

rich

unread,
Apr 10, 2009, 3:31:40 AM4/10/09
to
On Thu, 09 Apr 2009 12:31:06 -0700, John Corliss wrote:

<snip>


>>>>>>>> Can anybody tell me which version I should use?
>>>>>>> This is answered in the FAQ:
>>>>>>> http://gimp-win.sourceforge.net/faq.html#py
>>>>>> Thanks very much for the info! 80)>
>>>>> Hi John, its me again still harping about gimp.
>>>>>
>>>>> I had to install python on my windows version of gimp last year
>>>>> purely for the "separate-layers" plugin. At the time I was using
>>>>> gimp 2.4.x and I came across a package called "gimp-python easy"
>>>>> which had everything included. Pulled this from my archive:
>>>>>
>>>>> gtk-2.10.11-win32-1.exe
>>>>> pycairo-1.2.6-1.win32-py2.5.exe
>>>>> pygobject-2.12.3-1.win32-py2.5.exe
>>>>> pygtk-2.10.6-1.win32-py2.5.exe
>>>>> python-2.5.2.msi
>>>>> IDIOTS NEVER READ THIS.txt
>>>>>

<snipped a lot>

It all becomes clear when you follow the installation sequence, ie
install the python/cairo stuff before gimp.

During the installation select the customize option and there is a tick
box for enabling python support. Sorry - this means that you will have
to reinstall gimp.

I did a quick monitor of the installations in a v. machine and there are
hundreds of files written and around 500 reg entries by python,
presumably thats why it has to be installed before gimp. Only adds one
file to /system32 however so should not affect anything else. Seems to
work ok with gimp 2.6.6

The read-me (as above) still refers to the older archive which has in
fact been updated to :

gtk-2.12.9-win32-1.exe
pycairo-1.4.12-1.win32-py2.5.exe
pygobject-2.14.1-1.win32-py2.5.exe
pygtk-2.12.1-2.win32-py2.5.exe
python-2.5.2.msi

which the python-easy author says are the best mix - at least at the end
of 2008.

--
rich

John Corliss

unread,
Apr 10, 2009, 4:51:52 AM4/10/09
to
> to reinstall gimp. (snip)

Thanks then. I would modify the last instruction to read:

11. During the installation process, press the "Customize" button and
put a tick in the GIMP Python extension check box that appears
later on.

> I did a quick monitor of the installations in a v. machine and there are
> hundreds of files written and around 500 reg entries by python,
> presumably thats why it has to be installed before gimp. Only adds one
> file to /system32 however so should not affect anything else. Seems to
> work ok with gimp 2.6.6

Yes, I fully expected it to be necessary to reinstall GIMP. I used Total
Uninstall to monitor its current installation, set a Restore Point too
and don't have a lot of effort involved in configuring it yet, so this
won't be a big deal.

> The read-me (as above) still refers to the older archive which has in
> fact been updated to :
>
> gtk-2.12.9-win32-1.exe
> pycairo-1.4.12-1.win32-py2.5.exe
> pygobject-2.14.1-1.win32-py2.5.exe
> pygtk-2.12.1-2.win32-py2.5.exe
> python-2.5.2.msi

Thanks for pointing this out. Guess the reason I didn't pay attention
when I was editing the readme is that I intend to use the most current
versions of everything that will work with GIMP.

(slightly later) I just did a quick check and here are the links to the
current versions of all that stuff:

PyCairo: http://ftp.gnome.org/pub/GNOME/binaries/win32/pycairo/1.4/
PyGObject: http://ftp.gnome.org/pub/GNOME/binaries/win32/pygobject/2.14/
PyGTK: http://ftp.gnome.org/pub/GNOME/binaries/win32/pygtk/2.12/
Python: http://www.python.org/download/

As for gtk+:

http://forum.zebulon.fr/kerio-notice-d-emploi-t28856.html&pid=238470&mode=threaded

Good Lord. This is like wiping one's ass on a hoola-hoop; there's no end
to the crap!

According to this site though:

http://gimp-win.sourceforge.net/faq.html#py

"If you just intend to use Python scripts from within GIMP, there is no
need to install GTK+ separately."

I guess this means "as opposed to using Python scripts from outside of
GIMP" which AFAIK, I have no intention of doing.

Regardless, the most current version of gtk+ is 2.16.0-2, at least AFAICT:

http://www.gtk.org/download-windows.html

They also say "as of GIMP 2.6.4, both Python 2.5 and 2.6 are supported",
which doesn't mention the non-backwardly-compatible Python 3 (currently
3.0.1), so it's probably a good idea not to go with that version until
GIMP is written to support it.

> which the python-easy author says are the best mix - at least at the end
> of 2008.

Thanks again for your help, Rich.

--
John Corliss

0 new messages