I would like to install the Pillow
package on an Ubuntu 18.04 VPS running Python 3.7. I first created a virtual environment --
python -m venv /path/to/env
source /path/to/env/bin/activate
from there i tried installing Pillow
by running pip install Pillow
but the following exception happens:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-0c7eruo4/Pillow/setup.py", line 806, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
According to this answer the package libjpeg8-dev
needs to be installed, but Ubuntu's telling me it's already been installed, so I don't know what's going on. (I also verified the non-dev version libjpeg8
was installed, to be safe) I haven't encountered this many errors when simply setting up a Python development environment before -- can someone advise?