Way to install other python lib like numpy, opencv in GIMP 3.0.0 RC2 Python Interpreter?

I am unable to use pip install directly with the Python 3.12.8 interpreter that comes with GIMP 3.0.0 RC2. As a workaround, I use my system Python 3.12.8 to install the required packages (e.g., numpy) using pip. After installation, I manually copy the entire site-packages directory from my system Python environment to the corresponding site-packages directory in GIMP’s Python environment. If there’s a better or more reliable way to do this, I’d love to know Thank

@ngminteck What is the OS where GIMP is installed?

Probably Windows, given that the question is also asked there: No module named 'numpy._core._multiarray_umath' error when using GIMP 3.0.0 RC2 Python Interpreter in PyCharm - Stack Overflow

1 Like

If this is on Windows, this is due to recent Python 3.12 changes that made the situation got worse. It never worked properly, before and after RC2: Make easier to install Python3 packages to work with GIMP .py plugins (#6925) · Issues · GNOME / GIMP · GitLab

1 Like

Thanks for sharing

window 11 64 bits, I installed GIMP at default path

C:\Program Files\GIMP 3

Can I use own Python interpreter instead GIMP inbuilt Python interpreter?

ISY5004-ITSS-GC-PM-G9-AIMeiMei/AiMeiMei

Hi, that is me, I try do it manually by copy the lib in site-package, however any lib that use some sort of C language in backend processing will have issue

That is expected due to difference in the deps that libs are linking

In short, these sort of things should be installed like pacman -S $MINGW_PACKGE_PREFIX-python-$MODULE, which of course doesn’t work because we don’t include pacman.

i also even try install python 3.12.8 in GIMP/lib folder which don’t. Seem no good solution for window and i decided to use tkinter or pyqt p-ranav/PhotoLab: AI-Powered Photo Editor (Python, PyQt6, PyTorch) instead

What you could try instead is change lib/gimp/3.0/interpreters/pygimp.interp and change all pythonw.exe to add a path to your system installed python.

Not sure if this is enough, but worth a try. Note that path separators may need to be / instead of \.


I manage it to make it happen with building from source
after chatgpt guide me through the ninja build process (multiple build error and retry)

IMHO no need to install from source for this. You just see to set us a terminal with the appropriate environment variables to be able to run the python interpreter that comes with Gimp. When I was on windows I did it a couple of times with the Python v2 interpreter.

Here is how someone did it. Doing it for V3 shouldn’t be very different.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.