ubuntu安装apt-get install pillow
时报错
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-aqe_4p_u/pillow_da3243d0724944f48ebdfd1f74f05039/setup.py", line 1037, in <module>
raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
Please see the install instructions at:
https://pillow.readthedocs.io/en/latest/installation.html
----------------------------------------
ERROR: Command errored out with exit status 1: /home/tripod/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-aqe_4p_u/pillow_da3243d0724944f48ebdfd1f74f05039/setup.py'"'"'; __file__='"'"'/tmp/pip-install-aqe_4p_u/pillow_da3243d0724944f48ebdfd1f74f05039/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rmp66b9b/install-record.txt --single-version-externally-managed --compile --install-headers /home/tripod/venv/include/site/python3.6/pillow Check the logs for full command output.
执行apt install libjpeg-dev zlib1g-dev
后再安装即可
网友评论