GNOME Bugzilla – Bug 676546
Python - pygtk.pth - No module named runtime
Last modified: 2014-02-17 00:30:01 UTC
Using any of the script interpreters in batch mode yields an error during Python initialization. The error is caused by the line "import runtime" in the file "pygtk.pth". As there is no such module, this line should probably be removed. Here's how to reproduce: gimp-2.8.exe -ib "(gimp-quit 0)" 2>stderr.log type stderr.log: Error processing line 3 of C:\Programme\GIMP 2\Python\lib\site-packages\pygtk.pth: Traceback (most recent call last):
+ Trace 230253
exec line
ImportError: No module named runtime
Remainder of file ignored (gimp-2.8.exe:176): LibGimpBase-WARNING **: gimp-2.8.exe: gimp_wire_read(): error
I can't reproduce this under Linux so it would appear to be either a Windows specific problem or a problem with your Python installation. The file in question is part of python-gobject not part of pygimp or one of the plug-ins that come with pygimp. Which package of Python did you install on your machine (eg. Active Python)? Have you checked to see if you are missing an environment variable (eg. PYTHONLIBS) that points to libraries/DLL files needed to run Python programs?
The current 2.8.0 installers by Jernej include Python.
I am using the GIMP 2.8 for Windows distribution by Jernej. You can’t reproduce this under Linux, because Python is packaged separately under Linux and the line in question is not in pygtk.pth. (And it wasn’t in GIMP 2.6 for Windows, either.) Of course you can put it there, in which case you get the error message above. I think I am not missing any environment variables or DLLs. The problem disappears if that line is erased.
Confirming this for GIMP 2.8.2 on Win 7, 32 bit (Jernejs build). The redirected stderr output: ** (pythonw.exe:2816): WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags' ** (pythonw.exe:2816): WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags' ** (pythonw.exe:2816): WARNING **: Trying to register gtype 'GSocketMsgFlags' as enum when in fact it is of type 'GFlags' (gimp-2.8.exe:1888): LibGimpBase-WARNING **: gimp-2.8.exe: gimp_wire_read(): error I have only the Python installed that came with GIMP.
Does this still happen with the latest 2.8.10 installer?
The offending line "import runtime" is no longer in the file "pygtk.pth". The original issue is solved. The warnings from comment 4 persist. But that would be another bug.