uploadcare / pillow-simd

The friendly PIL fork
https://python-pillow.github.io/pillow-perf/
Other
2.12k stars 85 forks source link

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

Open jet082 opened 1 month ago

jet082 commented 1 month ago

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

Here's my step-by-step.

0) Optionally, make sure you're running Python 3.11. Otherwise you have a slightly different final step. 1) git clone https://github.com/microsoft/vcpkg.git 2) 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"

3) pip install -U --force-reinstall pillow-simd (If you are on python 3.12, run pip install -U --force-reinstall pillow@git+https://github.com/time4tea/pillow-simd.git@simd/10.2.x)