Gimp Integration failing.
Answered
Running the following code in PyCharm:
from gimpfu import *
results in the following error:
C:\Python27\python.exe D:/P5/m-cworkshop/Sprites2d/spritofu.py
Traceback (most recent call last):
File "D:/P5/m-cworkshop/Sprites2d/spritofu.py", line 2, in <module>
from gimpfu import *
File "C:\Program Files\GIMP 2\32\lib\gimp\2.0\python\gimpfu.py", line 76, in <module>
import gimp
ImportError: DLL load failed: Det angivne modul blev ikke fundet. (translation here: the given module was not found)
Process finished with exit code 1
Which is pretty odd because I added the folder, containing gimp.pyd to the path of the interpreter.
What is going on here ?
Please sign in to leave a comment.
Hi there,
It happens because Interpreter Paths are taken into account only during static analysis (first of all, to resolve symbols in the stdlib and third-party libraries). Unlike content and source roots they are not included in PYTHONPATH during execution. Therefore, you just need to add the corresponding directory in PYTHONPATH in your run configuration as well.