尽管已安装必需的库,但Pillow的zlib依赖关系在ubuntu 18.04上失败

时间:2018-12-19 03:45:02

标签: python-3.x python-imaging-library zlib ubuntu-18.04

我想在运行Python 3.7的Ubuntu 18.04 VPS上安装Pillow软件包。我首先创建了一个虚拟环境-

python -m venv /path/to/env
source /path/to/env/bin/activate

我从那里尝试通过运行Pillow安装pip install Pillow,但发生以下异常:

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

根据this回答,需要安装软件包libjpeg8-dev,但是Ubuntu告诉我它已经已安装,所以我不知道发生了什么。 (为了安全起见,我还验证了安装了非开发版本libjpeg8的安全性)在简单地设置Python开发环境之前,我没有遇到这么多错误-有人可以建议吗?

0 个答案:

没有答案