Post Reply 

Python-Fu no-show Mac...

Nov 23, 2012, 20:48
Post: #1
Python-Fu no-show Mac...
I am running the latest version of GIMP, 2.8.3, on a Mac 10.6.8 machine with Python 2.6 and 2.7 installed. Even so, nowhere can I find the Python-fu scripts listed in a menu like they should be. I have tried making the .py files in the plug-ins folder executable via terminal with no success (chmod +x pyslice.py) and honestly don't know what else to do.

I see the Script-fu submenu under the Filters menu, and the splash screen looks like it is loading all the .py files, but then nothing.

Any advice on getting the plug-ins to show up (and hopefully functional) would be greatly appreciated!
Find all posts by this user
Quote this message in a reply
Nov 24, 2012, 09:42
Post: #2
RE: Python-Fu no-show Mac...
Look like you have no Python interpreter installed (in a terminal, type "python" and see what happens). On Linux, it's part of the system, on Windows, the Gimp installers provide one, but I don't know the status for OSX . So I'd say you should look for a Python interpreter for your OSX (see here: http://www.python.org/download/ and take a 2.7.3 version).

Once this is done you can edit the right files to make Gimp take the Python interpreter in account, but it's often easier to reinstall Gimp (the installer does the right thing if it finds Python).

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Nov 24, 2012, 14:36
Post: #3
RE: Python-Fu no-show Mac...
(Nov 24, 2012 09:42)ofnuts Wrote:  Look like you have no Python interpreter installed (in a terminal, type "python" and see what happens). On Linux, it's part of the system, on Windows, the Gimp installers provide one, but I don't know the status for OSX . So I'd say you should look for a Python interpreter for your OSX (see here: http://www.python.org/download/ and take a 2.7.3 version).

Once this is done you can edit the right files to make Gimp take the Python interpreter in account, but it's often easier to reinstall Gimp (the installer does the right thing if it finds Python).

Did what you said, Terminal responded:
Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

Not only that, but in the application contents directory there appears to be a Gimp 'built-in' python implementation - GIMP:Resources:lib:Python2.7 (and a pygtk directory too) with what looks to be the entire support structure (ie: zillions of files and loads of other directories).

I am almost wondering if this issue is just isolated to my particular workstation rather than being a OSX/Gimp issue. Now, how to fix it...

Uninstalled GIMP, installed Python 2.7.3, reinstalled Gimp 2.8.x, still no go.
Find all posts by this user
Quote this message in a reply
Nov 24, 2012, 17:09 (This post was last modified: Nov 24, 2012 17:10 by ofnuts.)
Post: #4
RE: Python-Fu no-show Mac...
Look for /usr/lib/gimp/2.0/interpreters/pygimp.interp (or whatever the equivalent directory tree is on OSX. On my system (Linux) it contains:

Code:
python=/usr/bin/python
/usr/bin/python=/usr/bin/python
:Python:E::py::python:

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Dec 29, 2012, 10:38
Post: #5
RE: Python-Fu no-show Mac...
I do have the same issue.

Strang thing is that the Python console is shown from GIMP 2.6.12

And not shown from GIMP 2.8.2.
Find all posts by this user
Quote this message in a reply
Dec 29, 2012, 11:34
Post: #6
RE: Python-Fu no-show Mac...
If you had Python with 2.6, it must have been using a separate interpreter you installed on the side. Maybe there is a conflict with the one built-in?

But what says the 'interp' file (see my earlier post)?

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Dec 29, 2012, 18:00
Post: #7
RE: Python-Fu no-show Mac...
I think I found the corresponding file at this location (The Gimp package is currently installed on my desktop):

Gimp.app/Contents/Resources/lib/gimp/2.0/interpreters/pygimp.interp

And the content is the following:

python=/tmp/skl/Gimp.app/Contents/Resources/bin/python2.6
/usr/bin/python=/tmp/skl/Gimp.app/Contents/Resources/bin/python2.6
:Python:E:Tonguey::python:
Find all posts by this user
Quote this message in a reply
Dec 29, 2012, 18:11
Post: #8
RE: Python-Fu no-show Mac...
And you indeed have a file '/tmp/skl/Gimp.app/Contents/Resources/bin/python2.6', marked executable (or a valid link to same)? Note that it could be there only when Gimp is running...

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Dec 29, 2012, 18:17
Post: #9
RE: Python-Fu no-show Mac...
Still no success despite many tests like:
Replace the content of the pygimp.interp file with your content
Installation of Python 2.7.3

When Gimp is starting, I can see that some scripts .py are loaded, so I would guess the Python interpreter is woking. But this python console is still not accessible from the Filter menu.
Find all posts by this user
Quote this message in a reply
Jan 11, 2013, 05:00 (This post was last modified: Jan 12, 2013 05:05 by shackra.)
Post: #10
RE: Python-Fu no-show Mac...
I have the same issue too.

There is my pygimp.interp:

Code:
jorge [~] ~> cat /usr/lib/gimp/2.0/interpreters/pygimp.interp
python=/usr/bin/python2
/usr/bin/python=/usr/bin/python2
:Python:E::py::python:

I have installed python 2.7.3. I installed this plugin http://registry.gimp.org/node/25101 (I change the shebang from python to python2 but nothing!) on /usr/lib/gimp/2.0/plug-ins and I cannot see it under Python-Fu or on any other place! Sad

edit:

Code:
jorge [/usr/lib/gimp/2.0/plug-ins] ~> python sprite_tape-0.4.py
  File "sprite_tape-0.4.py", line 26
    layer_numb=x+(y*cnt_hor)
                           ^
TabError: inconsistent use of tabs and spaces in indentation

aj√°!

I just got this error now:
Code:
jorge [/usr/lib/gimp/2.0/plug-ins] ~> python2 sprite_tape-0.4.py
Traceback (most recent call last):
  File "sprite_tape-0.4.py", line 7, in <module>
    from gimpfu import *
ImportError: No module named gimpfu
jorge [/usr/lib/gimp/2.0/plug-ins] ~> python2 sprite_detape-0.1.py
Traceback (most recent call last):
  File "sprite_detape-0.1.py", line 7, in <module>
    from gimpfu import *
ImportError: No module named gimpfu
jorge [/usr/lib/gimp/2.0/plug-ins] ~>

Then I restarted Gimp and I see the Sprite submenu :'D

Blog | Diaspora* | Bitbucket | Ohloh
Visit this user's website Find all posts by this user
Quote this message in a reply
Sep 2, 2013, 17:28
Post: #11
RE: Python-Fu no-show Mac...
For what it's worth, here's how I solved the same problem:

Go to Preferences > Folders > Plug-ins

Note that the current list includes "Library/Application Support/GIMP/2.8/plug-ins/", which is wrong.

Add "Library/Application Support/Gimp-2.8/plug-ins/" to the list.

Restart GIMP
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Loading PythonFu Plugin: ImportError for .../python/gimp.so (GIMP 2.8.22/OSX/Py2.7.9) joroek 1 256 Jul 11, 2017 07:26
Last Post: ythgilb
  Setting text markup from python script Burbly 1 392 Sep 16, 2014 12:29
Last Post: Burbly
  Python-Fu Script Not Registering image_artist 1 353 Sep 14, 2014 13:24
Last Post: image_artist
  Bashing my head - Batch Python Script nmiltner 1 410 Sep 5, 2014 00:58
Last Post: nmiltner
  Help with python script and drawables nmiltner 3 461 Aug 28, 2014 16:09
Last Post: nmiltner

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS