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

  • 相关阅读:
    考试
    学习笔记
    Seajs使用实例入门介绍
    使用属性选择器用于空链接 &如何做1像素细边框的table?
    简单制作U盘启动盘安装Ghost XP系统(大白菜+深度)
    Access-Control-Allow-Origin这个header这个头不能设置通配符域名
    windows查找svchost到底代表的是哪个服务
    可观察对象(Observable)
    [ flask ] flask-restful 实现嵌套的有关系的输出字段
    [ vue ] quasar框架踩坑:在vue文件外导入路由,执行router.push('/')没有效果
  • 原文地址:https://www.cnblogs.com/xueranzp/p/5128140.html
Copyright © 2011-2022 走看看