Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trouble importing third party Python packages to GIMP 2.10 so that they can be used t
#1
My goal is to import a couple third party Python packages for use with my GIMP installation. This will allow me to use these packages when developing a GIMP plugin. I noticed a few directories that may be of use. They are as follows:

C:\Program Files\GIMP 2\32\lib\python2.7

This directory contains a site-packages folder which contains packages such as requests and pip.

C:\Program Files\GIMP 2\32\bin

This directory contains a python.exe. When I run python --version in an elevated cmd at this directory path, the output is Python 2.7.16, which I assume is GIMP 2.10's version of Python. This is important because I have my own installation of Python 3.8.0 in my Program Files. If I'm anywhere outside of this path in the cmd, the version that outputs is 3.8.0.

I have added these directories to my PATH system variable and tried running pip install but the output tells me I have already installed the requested third party packages. The problem is that they are installed to my Python 3.8.0 installation. I'm trying to run pip install in the context of GIMP's Python environment.

Any advice would be much appreciated.
Reply
#2
You have to install pip for the Gimp Python run time, which is done by running get-pip.py with the Python interpreter in that runtime.

See https://www.gimp-forum.net/Thread-Gimp-p...85#pid4385
Reply


Forum Jump: