在Linux中安装Pillow(Python模块)期间失败 [英] Fail during installation of Pillow (Python module) in Linux
本文介绍了在Linux中安装Pillow(Python模块)期间失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用pip安装Pillow(Python模块),但是会引发此错误:
I'm trying to install Pillow (Python module) using pip, but it throws this error:
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
正如错误所言,我尝试了:
So as the error says, I tried:
pip install pillow --global-option="--disable-jpeg"
但是它失败了:
error: option --disable-jpeg not recognized
有人提示如何处理吗?
推荐答案
谢谢@mfitzp.就我而言(CentOS),这些库在yum存储库中不可用,但实际上解决方案甚至更容易.我做了什么:
Thank you @mfitzp. In my case (CentOS) these libs are not available in the yum repo, but actually the solution was even easier. What I did:
sudo yum install python-devel
sudo yum install zlib-devel
sudo yum install libjpeg-turbo-devel
现在枕头的安装成功完成.
And now pillow's installation finishes successfully.
这篇关于在Linux中安装Pillow(Python模块)期间失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文