How do I install Gimp-Python on windows?

3k Views Asked by At

I try to write a simple plugin with gimpfu in python and I tried following those instructions.

1.2. Installation Gimp-python consists of a Python module written in C and some native python support modules. You can build pygimp with the commands: ./configure make make install This will build and install gimpmodule and its supporting modules, and install the sample plugins in gimp's plugin directory.

Where do I have to execute those commands?

I tried adding my script to the plugins folder but it seems like there is no python module called gimpfu. I believe I have to enable or install it in some way, but I can't find a solutio to do it.

EDIT: It seems like gimpfu is availible in the gimpfy-console insode gimp. It just doesn't seem to be availible for my plugin scripts.

2

There are 2 best solutions below

9
xenoid On BEST ANSWER

No need to install anything. In the Windows versions Python support is built-in, and the gimpfu import is available when your code is executed by Gimp.

If you don't see the plugin in the menu it is likely a syntax error that doesn't let it run its registration code. See here for some debugging techniques.

However, since you mention PyCharm, you may have another Python interpreter installed and this makes things complicated because there can be conflicts depending on order of installation (and remember, Gimp uses Python 2.7)

Now it all depends if you are really doing a plugin (called from the Gimp menu) or a batch (where Gimp is called from a shell script), which is somewhat different. If you are writing a batch, see this answer for an example.

0
Ahmed AEK On

you don't need to install anything, on windows gimp comes with a python interpreter along with the libraries inside of it.

if you want to run your script from inside GIMP then you should check this answer and you should add the path to gimp to your system PATH environment variable (which is C:\Program Files\GIMP 2\bin on my system) , and instead of calling gimp-console.exe you should replace that with whatever gimp-console is currently available in that folder, the one on my system is gimp-console-2.10.exe.