python-build-standalone
python-build-standalone copied to clipboard
Unable to use Pillow ImageTk module
On python-build-standalone Python 3.12 or 3.13 (installed via uv), I tried this with the Pillow library (10.4.0, 11.0.0, 11.1.0; wheels or built from source):
import PIL._imagingtk
and got the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: bad argument type for built-in operation
If that import fails, the PIL.ImageTk module doesn't work properly. _imagingtk is a compiled C module.
Observed on both macOS and Linux (Arch). The import works fine on system / brew installations of Python.