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,成功安裝。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章