pillow-simd icon indicating copy to clipboard operation
pillow-simd copied to clipboard

Installing AVX2 version with zlib and libjpeg-turbo (python 3.11 or 3.12) on Windows: Instructions

Open jet082 opened this issue 1 year ago • 1 comments

This is not a bug report, just a suggestion for windows install instructions.

Here's my step-by-step.

  1. Optionally, make sure you're running Python 3.11. Otherwise you have a slightly different final step.
  2. git clone https://github.com/microsoft/vcpkg.git
  3. Run:
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe install zlib libjpeg-turbo freetype libwebp libpng tiff
$env:VCPKG_ROOT = "C:\Your\Path\To\vcpkg"
$env:PKG_ROOT = "$env:VCPKG_ROOT\installed\x64-windows"
$env:INCLUDE = "$env:INCLUDE;$env:PKG_ROOT\include"
$env:LIB = "$env:LIB;$env:PKG_ROOT\lib"
$CC="cl /arch:AVX2"
  1. pip install -U --force-reinstall pillow-simd

jet082 avatar Jun 06 '24 11:06 jet082

I followed this by doing the cloning and then up to the .\vcpkg.exe step before creating a venv then doing the rest.

Unfortunately I get ImportError: DLL load failed while importing _imaging: The specified module could not be found. when running PIL code that works fine with normal PIL.

Did I do something wrong or have things changed since this post was created?

O-J1 avatar Jul 30 '25 07:07 O-J1