Django之源码包安装Pillow失败

在搭建CentOS时,使用源码包安装Pillow时报如下错误:

running install
running bdist_egg
running egg_info
writing src/Pillow.egg-info/PKG-INFO
writing dependency_links to src/Pillow.egg-info/dependency_links.txt
writing top-level names to src/Pillow.egg-info/top_level.txt
reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.c'
warning: no files found matching '*.h'
warning: no files found matching '*.sh'
no previously-included directories found matching 'docs/_static'
warning: no previously-included files found matching '.appveyor.yml'
......(此处省略一堆报错)
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 806, 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

查询资料后发现缺少某个依赖, libjpeg-turbo-devel。

解决办法:

yum -y install libjpeg-turbo-devel

然后执行命令 python3 setup.py install,成功安装。

猜你喜欢

转载自blog.csdn.net/qq_38038143/article/details/80384814
今日推荐