← All errors
high termux

Pillow install fails on Termux (libjpeg missing)

Description

pip install pillow fails on Termux with 'libjpeg not found' or similar compilation error.

Cause

Termux does not bundle libjpeg-turbo by default. Pillow compiles from source and requires the native library.

Fix

Install libjpeg-turbo via pkg before installing pip packages.

Code change

Before
pip install pillow
After
pkg install libjpeg-turbo -y
pip install pillow