zoukankan      html  css  js  c++  java
  • [已解决]linux安装pillow报错: ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

    linux安装pillow报错:

    ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting

    经搜索,找到如下两种方案:

    一:

    sudo yum install python-devel
    sudo yum install zlib-devel
    sudo yum install libjpeg-turbo-devel

    二:

    sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk

    我用的第一种,下面那种可能不支持我用的linux版本,仅留作备用。执行后,再次运行pip install pillow就可以了。

    官网解决方案: https://pillow.readthedocs.io/en/3.0.0/installation.html#linux-installation

    Linux Installation

    Note

    Most major Linux distributions, including Fedora, Debian/Ubuntu and ArchLinux include Pillow in packages that previously contained PIL e.g. python-imaging. Please consider using native operating system packages first to avoid installation problems and/or missing library support later.

    We do not provide binaries for Linux. If you didn’t build Python from source, make sure you have Python’s development libraries installed. In Debian or Ubuntu:

    $ sudo apt-get install python-dev python-setuptools
    

    Or for Python 3:

    $ sudo apt-get install python3-dev python3-setuptools
    

    In Fedora, the command is:

    $ sudo yum install python-devel
    

    Prerequisites are installed on Ubuntu 12.04 LTS or Raspian Wheezy 7.0 with:

    $ sudo apt-get install libtiff4-dev libjpeg8-dev zlib1g-dev 
        libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
    

    Prerequisites are installed on Ubuntu 14.04 LTS with:

    $ sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev 
        libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
    

    Prerequisites are installed on Fedora 20 with:

    $ sudo yum install libtiff-devel libjpeg-devel libzip-devel freetype-devel 
        lcms2-devel libwebp-devel tcl-devel tk-devel
    

    ValueError:--enable-zlib requested but zlib not found, aborting.

    Ubuntu14.04下运行pip install pillow==3.1.1报错,ValueError: --enable-zlib requested but zlib not found, aborting.

    $ sudo apt-get build-dep python-imaging

    $ sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev

    $ pip install Pillow==3.1.1

  • 相关阅读:
    sql中压缩日志文件和ntextl转化为varchar的处理
    一个生成验证字符或数字的增强类(downmoon)(基于.net1.1)及调用示例
    web程序中获取应用程序系统变量的方法( For.net 1.1)
    ASP.NET 中的正则表达式MSDN(2)
    让sourceSafe每天自动备份及修复(适用于vss6.0和vss2005)
    用SQL语句修改字段的默认值
    关于.net2.0中Webconfig中连接串的加密
    软件工厂简介自MSDN
    获取SqlServer 2000中字段的备注信息
    使用.NET 向浏览器写入二进制文件
  • 原文地址:https://www.cnblogs.com/xueranzp/p/5128140.html
Copyright © 2011-2022 走看看