Sign up now! · Forgot password?
RSS/Atom feed identi.ca Twitter

Tutorial: Installing Python for GIMP 2.6 (Windows)

Written by · Created on Jun 05, 2009, last updated almost 4 years ago CC BY-NC License

Motivation

Today, most GIMP scripts/helpers/extensions are written using Python instead of the outdated SCHEME (known as Script-Fu). This allows a lot of great possibilities, but at the moment the installation of GIMP-Python (PythonFu) for Windows requires a few steps. I will try to explain them in this article.

Tutorial details

  1. 1

    This tutorial has been tested with:

    • Windows XP (32-bit), GIMP 2.6.11, Python 2.6.6, PyGtk all-in-one (all 32-bit), had to reboot (see step 11)
    • Windows Vista (32-bit), GIMP 2.6.11, Python 2.6.6, PyGtk all-in-one (all 32-bit), had to reboot (see step 11)
    • Windows Vista (64-bit), GIMP 2.6.11, Python 2.6.6, PyGtk all-in-one (all 32-bit)
    • Windows 7 (64-bit), GIMP 2.6.11, Python 2.6.6, PyGtk all-in-one (all 32-bit)

    If it works for you, please post your configuration to the comments.

  2. 2

    Before you install Python scripts and wonder why they don’t work, make sure that your GIMP installation contains Python support.

    You can determine this by looking into the “Filters” menu. If there’s a entry named “Python-Fu” next to “Script-Fu”, Python support is available.

    On the screenshot, you can see a German GIMP installation without Python support (no Python-Fu menu entry next to Script-Fu).

    This tutorial will cover the situation that GIMP for Windows is already installed and the missing Python support shall be added.

  3. 3

    Python is a programming language (scripting language) that is not shipped with GIMP, but can be downloaded separately. GIMP accesses to an installed Python interpreter and makes use of it.

    If Python is not available at the time of installing GIMP, the required Python support module for GIMP won’t be installed (see screenshot: it shows a GIMP installation window in custom mode, the “GIMP Python Extension” checkbox is disabled because Python is not available). It also shows that only Python 2.5 and 2.6 are supported.

    As a consequence, you will have to install the necessary GIMP modules (= re-install GIMP) after installing Python, too!

  4. 4

    There has been some confusion about different 32- and 64-bit versions of Windows, GIMP and Python.

    There are some rules for selecting the components:

    • There are GIMP builds for Win64, but they’re experimental and should only be used for testing. So if you download GIMP, you’ll normally get a 32-bit GIMP (perfectly usable with Win32 and Win64).
    • GIMP and Python have to be compiled for the same platform. So either you use the experimental 64-bit GIMP and Python 64-bit (not recommended) or you use the default 32-bit GIMP and a 32-bit version of Python (recommended).
    • Only Python 2.5 and Python 2.6 are supported by GIMP. I tried Python 2.7 and it didn’t work for me, Python 3 won’t either.
  5. 5

    Download these files:

    From python.org – choose the latest Python 2.6 version, then download the “Windows x86 MSI Installer”*

    PyGtk – click on “all-in-one installer” and download the pygtk-all-in-one-…win32-py2.6.msi file.

    *If you’re using the experimental GIMP/64, download Python/64 and PyGtk/64 instead. If you don’t know what this means, ignore this note.

  6. 6

    At first, install Python by launching the .msi file. Choose “install for all users”.

  7. 7

    Then run the PyGTK all-in-one-installer and install PyCairo, PyGtk and PyGObject. (If you are asked, install for all users too.)

  8. 8

    As explained above, you have to install GIMP’s Python support now. The easiest way to do so is to re-install GIMP (in my test, preliminary uninstall was not required).

    If you chose the customized setup (not required), you can see that the “GIMP Python Extension” will be installed now.

  9. 9

    Python support is now available in GIMP. Check by verifying that the Python-Fu menu is now available (see screenshot).

  10. 10

    By default, Python plugins (the .py files for the effects) must be stored either

    • in the .gimp-2.6/plug-ins directory of the user’s home folder (for instance, C:\Users\MyUsername\.gimp-2.6\plug-ins) or
    • in the lib\gimp\2.0\plug-ins subdirectory the GIMP installation directory (for instance, C:\Program Files (x86)\GIMP-2.0\lib\gimp\2.0\plug-ins.

    You can see and configure these directories when you start GIMP and choose Edit/Preferences/Folders\Plug-Ins.

    As soon as you restart GIMP, the plugins should be available. On the screenshot you can see the directory of “user1” where the Python-Fu plugins have to be stored.

  11. 11

    If the plug-ins show up but don’t do anything:

    • Reboot your system. On some systems, I had to reboot after installing GIMP. I don’t know why and I don’t want to know it, but before it didn’t work and then it did.
    • Also try to put the plug-ins into the GIMP installation folder (not the user folder) as described above.

Comments

Post your own comments, questions or hints here. The author and other users will see your posting and can reply to it.

Of course, you can also ask in the chat.

Subscription management

Please log in to manage your subscriptions.

*

As a registered user, you can rate articles and comments, attach files to comments, subscribe to topics and you don't need to solve CAPTCHAs anymore.

*…optional

svipper
1 day ago

USELESS,, the fcking all in one install is harder to find than polar bear in sahara desert! Shit! I want do simple task, and im wasteing 6 hours unistalling, installing, reinstalling, googling and so one!!!!!!!!!! SHIT!!!!!!!!!!!!!

Jaya
3 months ago

wow! tutorials are very good quality .. thank you so much because I really need it ..

Ab
almost 2 years ago

Works perfectly with: Win7(64-bit), python (32bit) 2.7, pygtk AIO installer for python 2.7.

Onihonker
about 2 years ago

Please update numbers to reflect a python 2.7 install. *Ran into a 2.6 error was not installed when running the All-In-One msi

Might frustrate other users. I got around it by finding the newer msi.

Ran
over 2 years ago

Great tutorial!
You've really helped me take my GIMP abilities up a notch!

Liz
almost 3 years ago

Thanks so much!
This tutorial was very detailed and very clear.

Barrie
almost 3 years ago

The link to; "From python.org – choose the latest Python 2.6 version, then download the “Windows x86 MSI Installer”*" has changed.
Its now at http://www.python.org/getit/releases/2.6.6/. Confused the hell out of me for awhile!
Thanks for the tutorial.

Amy
almost 3 years ago

*feels dumb* I was having the same issue as others.. went through all steps but then didn't have python-fu when i opened up Gimp. Then I realized I didnt install the all-in-one PyGTK I think some confusion lies in the fact that the link for the "all-in-one" downloads for PyGTK give you some non all-in-one downloads in the list as well, so you click on the first link without thinking, hope this helps someone?

arrey
almost 3 years ago

greetmaow!

Fafase
almost 3 years ago

OK I got it I think. I am using Windows 7 (Pro I think...) 64 bit (in case).
The problem might come from the Python you install, you need 2.6.4 ONLY.
Check this link http://www.gimpchat.com/viewtopic.php?f=23&t=2277 where everything worked like a charm for me, at least I have the Python fu script showing up.

Qasim
almost 3 years ago

Thanks a lot

caity
almost 3 years ago

hi how do i get to go on to gimp without downloading it

a.grey
almost 3 years ago

oh yeah, i forgot...

hp, 64 bit, windows 7.

a.grey
almost 3 years ago

i'm having the same troubles as others here... i go through steps 1-8, but when i get to 9 there's no Python-Fu menu. i've reinstalled, re-booted, everything andi get zilch.

any help?

Kara
about 3 years ago

Ronbu ~ TY!! so Much 4 ur help!! i Really appreciate your assistance!!

i just had some time to stop back in & saw your reply. i was able to easily read your instructions and very much look forward to giving it a go later tonight. meanwhile ... dinner is calling me.

i will be back to let you know rather i've had success or not. i have 0 experience with this sort of thing. but i'm not the type to give up and so i sincerely appreciate your help! thanx again!!

Ronbu member for over 4 years Ronbu 4 comments
about 3 years ago

Just click on the image thumbnail in my previous post to read it.

Ronbu member for over 4 years Ronbu 4 comments
about 3 years ago

Hi Kara.
My reply proper is (hopefully) attached since I am trying to retain formatting that this box does not keep.
We'll see what happens.

Kara
about 3 years ago

Hello: I am having trouble understanding exactly what I need to do to download Python so that I can use it in GIMP.

I clicked on phyton.org & chose the one closest to 2.6 & then clicked in my downloads but then a dialog basically said Windows couldn't run or open ~ sorry I forget which.

Then I looked for Windows X86 MSI Installer but I haven't been able to locate it any where. Do I need the MSI Installer to install the python 2.6 ... ??

Also, at the top the Play Now and Download will not open for me either.

So, basically I am stuck at step 5. I am new to computers and software but I am trying my best to learn and appreciate any help anyone can offer. I've been using GIMP for about 2 months & still have loads to learn.

I have a Dell laptop and use Windows 7. My computer is a 64bit which I know can cause issues.

So, if someone has more help for the software disabled I'd appreciate your assistance greatly. : )

Ronbu member for over 4 years Ronbu 4 comments
about 3 years ago

Thanks for a most helpful tutorial. It took a little bit of time but got me there on the first attempt.

babo
about 3 years ago

Thank you so much for this tutorial!
I am working on a Windows 7/64Bit and I could make it work. I would have never figured it out without you!

russ
about 3 years ago

UPDATE -

I went thru the tutorial again (for the 5th+ time) and notice that I did not download the PkGtk all-in-one installer - I downloaded just the PkGtk .msi file. When I downloaded and installed the all-in-one installer, and then reinstalled GIMP, things works as anticipated. Sorry for the false alarm :-)

russ
about 3 years ago

My laptop is 64 bit quad core running windows 7. I am trying to install GIMP and python. I am following this tutorial. When I open GIMP the python-fu submenu is not listed under the filters menu? Any ideas about what I might be doing wrong? In the comments below some others reference this issue, but do not see any suggested solutions. Can any one help?

Ali Geyik
over 3 years ago

Any suggestions on how to enable Python support for both Portable Python + Portable Gimp? Or at least for Portable Gimp?

Jan Willem Broekema
over 3 years ago

I tried setup with Python and PyGTK 2.7 on Win7 and that did indeed not work. Installing v2.6 (incl re-installing gimp-2.6.11) created the right menu but not the py-scripts.

Moving the scripts from the user-directory to the program directory, as suggested in step 11, made everything work.

Thanks a lot for your very crisp advice!

Avayak
over 3 years ago

Thanks for this useful tuturial.
I got it running on Win7 (64bit), GIMP 2.6.11, Python 2.6.6 and PyGtk all-in-one 2.22.6 (all 32bit).
A strange thing is that it does not work when I run GIMP with the "--verbose" parameter. In this case, the menu items are present but when I use them, nothing happens.

Joe Lotz
over 3 years ago

Same issue as others. Same PY plugin on load as Mark.

System: Windows XP (32-bit), GIMP 2.6.11, Python 2.7.1, PyGtk all-in-one (all 32-bit) 2.22.6

Mark Chalcraft
almost 4 years ago

Similar problem here to others recently commented - have followed steps 1-8 (checked and double checked) but it doesn't work.

Interestingly, when I load GIMP, I can see one of the PY plugins ("Export layers as PNG" in this instance) mentioned in the progress dialogue, yet when the program opens, no Python-FU and no plugin in the plugin browser!

System: Vista 32, Gimp 2.6.11, Python 2.6

infotech
almost 4 years ago

Thank you for your tutorial.I have followed your instructions to the letter (several times). I use the GIMP 32 bit version.
While on Windows 7 64 bit, Python-Fu is shown in the Filters menu, clicking console produces nothing other than a brief activity from the whirling cursor, which then stops(if I use the GIMP 64 bit version, an error message appears about the python console not functioning) and the python plugins do not work. I have installed, re-installed even used an earlier version of PyGTK as seen in another post. I use the 32 bit Python 2.6 installation (I tried the 64 bit but GIMP does not recognise it) I cannot get python to work in GIMP - despite the apparent loading of the scripts during startup. Any help appreciated. Thanking you in advance.

JSawyer
almost 4 years ago

Thanks for the article. Worked okay here - I already had Python 2.6.7 and GIMP 2.6.11 on XP. All I did was install PyGTK and re-run the GIMP installer for Python support. It kept my settings and everything.

WorstCases
almost 4 years ago

Did the same on Win 2k as described in the previous post, but used Gimp 2.6.7
Same problem.
Would appreciate any input!

WorstCases
almost 4 years ago

I was so happy to find this information, but somehow can't get to see Python-FU as described in step 9 too.
Did the custom installation and made sure Python is checked.
I use Vista 32, Gimp 2.6.11 and Python 2.6.6

Anybody any input?

lars
almost 4 years ago

when will python for gimp be updated to new python (3 or higher 2 version). now I need so many python version on my pc...

taralainee member for about 4 years taralainee 1 comment
almost 4 years ago

Thank you so much! Im new to gimp and I swear I learn something new everyday! Thanks again!

huisky member for about 4 years huisky 2 comments
almost 4 years ago

yes, it was checked. i'm pretty sure about this.

redforce member for over 8 years redforce 230 comments
almost 4 years ago

@huisky: At step 8, is "GIMP Python Extension" checked (use Custom installation mode)?

huisky member for about 4 years huisky 2 comments
almost 4 years ago

strange! i failed at step 9. and step 1-8 are perfect!
i do NOT know why? any explains?

Jose
almost 4 years ago

Thanks redforce!! Some months ago I was trying to install Python just to enable support for Python plugins in GIMP, but I couldn't. I hope the GIMP development team add support for Python 3.0 in the near future.

redforce member for over 8 years redforce 230 comments
almost 4 years ago

Updated instructions and deleted all comments that don't make sense anymore.

Yar member for about 4 years Yar 1 comment
about 4 years ago

I had the same problem as anonymous and Python 2.5.4 (with appropriate versions of the other modules) worked fine. I saw no errors with 2.6 but the Python plug-ins I needed wouldn't run until I tried 2.5.4.

In the last step of these otherwise excellent instructions, I was able to drop my two .py files into C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins (as instructed by one of the plug-in's authors) and it works fine. There's nothing in the .gimp-2.6\plug-ins folder.

dertyeye
over 5 years ago

For using this in a good way.
The different gimp applications should be able to pick a folder, and it should be editable in the preferences for each Gimp.
A user could during installation of Gimp 2.8, choose to create a new folder, use it and migrate everything from the previous version.
Create a new folder, use this and leave it empty.
Create a new folder but use the previous version folder.
(This can be handy for checking compatibility, this should be default.)
Create a new folder but use the previous version folder and migrate everything to the new folder.

These settings should be set seperatelly in the installer.

dsgsdgsgsqg
over 5 years ago

Quote:
"C:\Documents and Settings\\.gimp-2.4 to
C:\Documents and Settings\\.gimp-2.6 and (eventually) to
C:\Documents and Settings\\.gimp-2.8

In past transitions 2.3 --> 2.4 --> 2.5 --> 2.6 sometimes thinks have gotten screwed up. As well if you temporarily want to have access (have both installed) to both previous and latest GIMP versions and add new scripts, plugins, brushes etc they have to be done in two places."

It would be better to have a more robust folder system, because some stuff are compatible with a certain version of Gimp.
Something like:

C:\Documents and Settings\\.gimp2\2.4\
C:\Documents and Settings\\.gimp2\2.6\
C:\Documents and Settings\\.gimp2\2.8\

Would be more robust, and it would easier to track down migrations from one version to another.

Alec_Burgess member for over 5 years Alec_Burgess 3 comments
over 5 years ago

you say: > Python plugins must be stored in the .gimp-2.6/plug-ins directory of the user's home folder.

Actually, this target location is controlled by values entered in Edit-Preferences-Folders-Plugins. (stored in gimprc file)

Note that where GIMP looks to find the gimprc file is controlled by Environment variable GIMP2_DIRECTORY

A couple of reasons for possibly wanting to use either of both the above mechanisms to control where GIMP finds the bits and pieces it uses to run ...

(1) if you add lots of brushes, palettes, scripts, plugins etc to "pimp your gimp" it can get very confusing figuring out what was added and for what reasons if its all stored together in a mish-mosh.

(2) Gimp 2.7 is on the horizon (some windows versions have been released) and hopefully 2.8 will not be that far off. If using standard locations the installer for the new version *should* upgrade (by copying from (say) C:\Documents and Settings\\.gimp-2.4 to
C:\Documents and Settings\\.gimp-2.6 and (eventually) to
C:\Documents and Settings\\.gimp-2.8

In past transitions 2.3 --> 2.4 --> 2.5 --> 2.6 sometimes thinks have gotten screwed up. As well if you temporarily want to have access (have both installed) to both previous and latest GIMP versions and add new scripts, plugins, brushes etc they have to be done in two places.

Using above setups all the bits and pieces can be used as is with current and future versions.