The top-voted answer by @GokulNC is now slightly outdated; Pillow 8.2.0+ no longer uses libraqm.dll
, but instead fribidi.dll
.
From the installation documentation:
Pillow wheels since version 8.2.0 include a modified version of libraqm that loads libfribidi at runtime if it is installed. On Windows this requires compiling FriBiDi and installing fribidi.dll
into a directory listed in the Dynamic-link library search order (Microsoft Learn) (fribidi-0.dll
or libfribidi-0.dll
are also detected). [...]
So, to use Raqm on Windows with the precompiled wheels (i.e. after running python.exe -m pip install Pillow
), you now need to place fribidi.dll
in any of the searched directories; I usually use the Python install directory, i.e. where python.exe
is located, e.g. C:\Program Files\Python312\
.
You can download a precompiled fribidi.dll
from the Pillow wheels.yml
workflow on GitHub: select a recent passing build and download and extract the correct fribidi-...
artifact for your version of Python, x86/x64/ARM64 (you may have to log in to download artifacts).
libraqm.dll
andfribidi-0.dll
next to 32/64-bitpython.exe
C:\Windows\System32
as we generally do with most DLLs. Thanks a lot, both for the help and your binaries!! :)