Ubuntu下关于pillow(PIL)安装问题

Ubuntu16.04下安装pillow 作者使用的是windows 64位系统,然而PIL只支持32位系统并且现在已经停止更新维护了,在网上查找发现了pillow这个替代PIL的图片处理的库。官方文档[^footnote]中给出pillow安装简介。 安装 警告 Pillow >= 2.1.0 不支持 “import _imaging”。请使用 “from PIL.Image import core as _imaging” 代替。 阅读详情

问题描述:

我在Ubuntu系统下通过pip3 install pillow命令安装pillow库时,出现如下错误:

Collecting pillow
  Using cached https://files.pythonhosted.org/packages/8f/7d/1e9c2d8989c209edfd10f878da1af956059a1caab498e5bc34fa11b83f71/Pillow-8.3.1.tar.gz
Building wheels for collected packages: pillow
  Running setup.py bdist_wheel for pillow ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7ndqcr0/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmppljtdy3_pip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-aarch64-3.6
  creating build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/GimpPaletteFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PcxImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/_version.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/WmfImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PsdImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageQt.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/FliImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/FpxImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/WebPImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/CurImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PSDraw.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/FontFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/TgaImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageOps.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/SunImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/IcoImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/MpegImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/IptcImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageWin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/WalImageFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageTk.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/Image.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageShow.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/EpsImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PalmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/features.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PaletteFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageMorph.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/BlpImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/__init__.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageFilter.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageTransform.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/TiffTags.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/XbmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/XpmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/MicImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageGrab.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PyAccess.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/__main__.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/BdfFontFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/BmpImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/_tkinter_finder.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageColor.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageMath.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PngImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/JpegPresets.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/DdsImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/GimpGradientFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageDraw.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/SgiImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ExifTags.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageEnhance.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/DcxImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PdfParser.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImagePalette.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PpmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/TarIO.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PixarImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ContainerIO.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/MpoImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageFont.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageSequence.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImagePath.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/GifImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/GdImageFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageStat.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PcfFontFile.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/_binary.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/TiffImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PdfImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageChops.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageDraw2.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageCms.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImtImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/GbrImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/FtexImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/PcdImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/MspImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/ImageMode.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/_util.py -> build/lib.linux-aarch64-3.6/PIL
  copying src/PIL/JpegImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
  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'
  warning: no previously-included files found matching '.appveyor.yml'
  warning: no previously-included files found matching '.clang-format'
  warning: no previously-included files found matching '.coveragerc'
  warning: no previously-included files found matching '.editorconfig'
  warning: no previously-included files found matching '.readthedocs.yml'
  warning: no previously-included files found matching 'codecov.yml'
  warning: no previously-included files matching '.git*' found anywhere in distribution
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '*.so' found anywhere in distribution
  no previously-included directories found matching '.ci'
  adding license file 'LICENSE'
  writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
  running build_ext
  
  
  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
  
  Traceback (most recent call last):
    File "/tmp/pip-build-g7ndqcr0/pillow/setup.py", line 1021, in <module>
      zip_safe=not (debug_build() or PLATFORM_MINGW),
    File "/home/nvidia/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/nvidia/.local/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/nvidia/.local/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/home/nvidia/.local/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/tmp/pip-build-g7ndqcr0/pillow/setup.py", line 788, in build_extensions
      raise RequiredDependencyException(f)
  __main__.RequiredDependencyException: jpeg
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-build-g7ndqcr0/pillow/setup.py", line 1034, 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
  
  
  
  ----------------------------------------
  Failed building wheel for pillow
  Running setup.py clean for pillow
Failed to build pillow
Installing collected packages: pillow
  Running setup.py install for pillow ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7ndqcr0/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-q0wtry8z-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-aarch64-3.6
    creating build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/GimpPaletteFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PcxImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/_version.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/WmfImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PsdImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageQt.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/FliImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/FpxImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/WebPImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/CurImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PSDraw.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/FontFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/TgaImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageOps.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/SunImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/IcoImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/MpegImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/IptcImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageWin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/WalImageFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageTk.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/Image.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageShow.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/EpsImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PalmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/features.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PaletteFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageMorph.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/BlpImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/__init__.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageFilter.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageTransform.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/TiffTags.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/XbmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/XpmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/MicImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageGrab.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PyAccess.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/__main__.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/BdfFontFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/BmpImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/_tkinter_finder.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageColor.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageMath.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PngImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/JpegPresets.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/DdsImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/GimpGradientFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageDraw.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/SgiImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ExifTags.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageEnhance.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/DcxImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PdfParser.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImagePalette.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PpmImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/TarIO.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PixarImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ContainerIO.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/MpoImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageFont.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageSequence.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImagePath.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/GifImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/GdImageFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageStat.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PcfFontFile.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/_binary.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/TiffImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PdfImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageChops.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageDraw2.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageCms.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImtImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/GbrImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/FtexImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/PcdImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/MspImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/ImageMode.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/_util.py -> build/lib.linux-aarch64-3.6/PIL
    copying src/PIL/JpegImagePlugin.py -> build/lib.linux-aarch64-3.6/PIL
    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'
    warning: no previously-included files found matching '.appveyor.yml'
    warning: no previously-included files found matching '.clang-format'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching 'codecov.yml'
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    no previously-included directories found matching '.ci'
    adding license file 'LICENSE'
    writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
    running build_ext
    
    
    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
    
    Traceback (most recent call last):
      File "/tmp/pip-build-g7ndqcr0/pillow/setup.py", line 1021, in <module>
        zip_safe=not (debug_build() or PLATFORM_MINGW),
      File "/home/nvidia/.local/lib/python3.6/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/nvidia/.local/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.6/distutils/command/install.py", line 589, in run
        self.run_command('build')
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/nvidia/.local/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 79, in run
        _build_ext.run(self)
      File "/home/nvidia/.local/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
        _build_ext.build_ext.run(self)
      File "/usr/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/tmp/pip-build-g7ndqcr0/pillow/setup.py", line 788, in build_extensions
        raise RequiredDependencyException(f)
    __main__.RequiredDependencyException: jpeg
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-g7ndqcr0/pillow/setup.py", line 1034, 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
    
    
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7ndqcr0/pillow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-q0wtry8z-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-g7ndqcr0/pillow/

解决办法

通过如下命令安装完整的依赖:

sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev

在这里插入图片描述
完成之后再通过pip3 install pillow命令安装即可成功。

参考文档:http://lotrc.com/?p=330

第055篇:陆地观测卫星数据服务平台高级检索方法 检索数据检索到肩膀疼,这谁能信?谁能? 阅读详情

相关推荐

别再让信号‘撞墙’了!手把手教你用嘉立创阻抗计算器搞定PCB高速线(附免费压层结构选择)

本文详细介绍了如何使用嘉立创阻抗计算器解决PCB高速线设计中的阻抗匹配问题,避免信号反射和传输损耗。通过免费压层结构选择和五步计算法,帮助工程师快速掌握USB3.0差分线等高速信号的设计技巧,提升PCB设计效率和信号质量。

weixin_30736301的博客 284

【问题记录】ubuntu安装pillow失败

背景:安装一个whl文件,需要pillow支持,不太懂ubuntu下多个版本python环境的操作,只能通过python3和pip3访问3.8版本的python。以及刚开始卸载pillow旧版本(一开始有这个报错:cannot import name ‘_imaging’ from ‘PIL’)时也卸载不掉,用的这个命令。【问题记录】ubuntu安装pillow失败。

qq_45617169的博客 576

Mike 21如何制作随水深变化的糙率文件

MIKE 21如何制作随水深变化的糙率文件

zhuzhujiayoua的博客 2250

Ubuntu下安装Pillow

原文网址:http://www.cnblogs.com/misspy/p/4331445.html python pil 安装 Ubuntu下 sudo pip install pil 安装PIL可能会出现问题,例如安装完成时显示JPEG support not available 或者 ZLIB (PNG/ZIP) support not available   1.

qingyuanluofeng的专栏 1万+

Keil5安装包别乱下!手把手教你从官网精准下载C51/V960和MDK5,并完成2032年有效注册(避坑网络资源失效)

本文详细介绍了如何从Keil官网安全下载C51 V9.60和MDK5开发环境,并提供2032年有效注册的完整指南。通过验证安装包完整性、自定义安装路径和长期激活方案,帮助开发者避开网络资源陷阱,搭建稳定的STM32开发环境。

weixin_26886855的博客 541

基于 Wi-Fi 的室内定位系统

目前,随着国内外相关从业人员的研究,研究者们提出了众多室内定位技术的理论与方法。在此仅讨论基于 Wi-Fi 的室内定位技术。 WI-FI室内定位 近年来Wi-Fi技术飞速发展,城市中的公共场所如大型超市商场、学校、企业等都已经广泛部署Wi-Fi。Wi-Fi室内定位技术已经出现了很多具有代表性的研究成果,如RADAR系统、Nibble系统、Weyes系统等室内定位系统。2012年,Google把Wi...

温染的笔记 9567

ubuntu 下安装 pillow zlib

zlibc zlib1g zlib1g-devpython 安装图像处理 sudo pip install pillow

java_goodstudy的博客 1032

用VSCode搭建Vue.js开发环境及Vue.js第一个应用

用VSCode搭建Vue.js开发环境及Vue.js第一个应用

m0_61961937的博客 1万+

Ubuntu20.04服务器+Anaconda上创建Python3.6虚拟环境并安装Pytorch1.0.1+opencv+numpy+pillow

Ubuntu20.04服务器上已安装Anaconda,创建Python3.6虚拟环境、安装Pytorch1.0.1并安装opencv、numpy、pillow

VGuan07的博客 6421

避开奸商套路!手把手教你用Thaiphoon Burner和CPU-Z,一眼看穿内存SPD信息有没有被篡改

本文教你使用Thaiphoon Burner和CPU-Z工具,快速识别内存SPD信息是否被篡改,避免购买到虚标频率或假冒颗粒的内存条。通过详细步骤和实战案例,帮助用户掌握内存检测技巧,确保硬件购买的透明度和安全性。

weixin_32228501的博客 690

AI应用工程师面试指南与参考答案

摘要:AnkerAI应用工程师职位面向2024/25届毕业生,要求计算机相关专业背景,强调工程实现与技术探索能力。岗位职责包括全栈开发、AI技术整合(如大模型、图像识别)、团队AI赋能及系统优化。职位更看重编程实践能力(Python/Java等)和学习潜力,而非单纯算法知识。成功候选人将参与智能化产品开发,获得导师指导和技术成长机会。面试准备应聚焦项目经验展示、业务需求理解和技术解决方案能力,通过结构化回答和实操案例体现工程思维与创新潜力。

郑伟强dev的专栏 418

python安装不了pillow_安装python库Pillow(PIL)出现问题及解决方法

安装PIL,问题多多,现将出现问题,原因,以及解决方法总结如下:PIL的官方版本,但是最后一次维护是2009年,现以宣布停止维护,可以运行在python2.7上。PillowPIL的fork版本,还在继续维护更新,建议安装Pillow。在安装Pillow之前,请卸载PILsudo pip uninstall PIL安装Pillow 依赖,下面安装是真对ubuntu14.04版本libfreetyp...

weixin_39945445的博客 2009

【同等学力】01-逻辑符号表达

F(x): x是确诊者,G(x):x有症状F(x): x是老人,G(x):x是宠物,L(x,y): x喜欢y。

super_mochi1 1881

PIL和Pillow、 Ubuntu PIL 安装

关于Pillow与PIL PIL(Python Imaging Library)是Python一个强大方便的图像处理库,名气也比较大。不过只支持到Python 2.7。 PIL官方网站:http://www.pythonware.com/products/pil/ Pillow是PIL的一个派生分支,但如今已经发展成为比PIL本身更具活力的图像处理库。目前最新版本是3.0.0。 Pillow的Github主页:https://github.com/python-pillow/Pillow Pillow...

小韭菜的博客 950

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

python中的pil安装出现警告_安装python库Pillow(PIL)出现问题及解决方法

安装PIL,问题多多,现将出现问题,原因,以及解决方法总结如下:PIL的官方版本,但是最后一次维护是2009年,现以宣布停止维护,可以运行在python2.7上。PillowPIL的fork版本,还在继续维护更新,建议安装Pillow。在安装Pillow之前,请卸载PILsudo pip uninstall PIL安装Pillow 依赖,下面安装是真对ubuntu14.04版本libfreetyp...

weixin_36459164的博客 1268

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

qpython装pillow_安装python库Pillow(PIL)出现问题及解决方法

安装PIL,问题多多,现将出现问题,原因,以及解决方法总结如下:PIL的官方版本,但是最后一次维护是2009年,现以宣布停止维护,可以运行在python2.7上。PillowPIL的fork版本,还在继续维护更新,建议安装Pillow。在安装Pillow之前,请卸载PILsudo pip uninstall PIL安装Pillow 依赖,下面安装是真对ubuntu14.04版本libfreetyp...

weixin_42504048的博客 814

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

python pillow无法安装_安装python库Pillow(PIL)出现问题及解决方法

安装PIL,问题多多,现将出现问题,原因,以及解决方法总结如下:PIL的官方版本,但是最后一次维护是2009年,现以宣布停止维护,可以运行在python2.7上。PillowPIL的fork版本,还在继续维护更新,建议安装Pillow。在安装Pillow之前,请卸载PILsudo pip uninstall PIL安装Pillow 依赖,下面安装是真对ubuntu14.04版本libfreetyp...

weixin_39828198的博客 774

安装python库Pillow(PIL)出现问题及解决方法

安装PIL,问题多多,现将出现问题,原因,以及解决方法总结如下: PIL的官方版本,但是最后一次维护是2009年,现以宣布停止维护,可以运行在python2.7上。 PillowPIL的fork版本,还在继续维护更新,建议安装Pillow。 在安装Pillow之前,请卸载PIL sudo pip uninstall PIL 安装Pillow 依赖,下面安装是真对ubu

BigBoySunshine的专栏 5549

Ubuntu16.04 安装pillow

转载:http://allstack.net/wordpress/post-2295.html Ubuntu16.04 安装pillow Posted on 2017年3月24日, updated on 2017年3月24日 by allenmo 安装命令: Shell   1 sudo pip install pillow 在用matplot...

caiexu的博客 4173

python安装第三方库pillow_安装python库Pillow(PIL)出现问题及解决方法

安装PIL,问题多多,现将出现问题,原因,以及解决方法总结如下:PIL的官方版本,但是最后一次维护是2009年,现以宣布停止维护,可以运行在python2.7上。PillowPIL的fork版本,还在继续维护更新,建议安装Pillow。在安装Pillow之前,请卸载PILsudo pip uninstall PIL安装Pillow 依赖,下面安装是真对ubuntu14.04版本libfreetyp...

weixin_39689819的博客 505

python3.7.2怎么用不了pillow_安装python库Pillow(PIL)出现问题及解决方法

安装PIL,问题多多,现将出现问题,原因,以及解决方法总结如下:PIL的官方版本,但是最后一次维护是2009年,现以宣布停止维护,可以运行在python2.7上。PillowPIL的fork版本,还在继续维护更新,建议安装Pillow。在安装Pillow之前,请卸载PILsudo pip uninstall PIL安装Pillow 依赖,下面安装是真对ubuntu14.04版本libfreetyp...

weixin_39932838的博客 577

ubuntu下如何安装PIL

安装PIL注意事项

deyuzhi的专栏 7593

linux安装pil库_Linux上安装Python的PIL和Pillow库处理图片的实例教程

安装正常情况,只需pip install PIL==1.1.7或者pip install Pillow==2.9.0即可。但需留意安装后的输出安装完成后,需留意输出:*** TKINTER support not available*** JPEG support not available*** WEBP support not available*** ZLIB (PNG/ZIP) suppo...

weixin_32641973的博客 422

PIL、Pillow安装使用方法

PIL(Python Imaging Library)是Python常用的图像处理库,而Pillow是PIL的一个友好Fork,提供了了广泛的文件格式支持,强大的图像处理能力,主要包括图像储存、图像显示、格式转换以及基本的图像处理操作等。Pillow的文档:http://pillow.readthedocs.io/en/latest/Pillow的github:https://github.com...

丿灬安之若死 2568

关于python中PIL的安装

python 的PIL安装是一件很蛋痛的事, 如果你要在python 中使用图型程序那怕只是将个图片从二进制流中存盘(例如使用Scrapy 爬网存图),那么都会使用到 PIL 这库,而这个库是出名的难安装. 它的表现为,如果你使用 Scrapy 的ImagePipeline 它就会默认使用PIL,如果没有正确安装图型解码器那会都会出现以下的错误: IOError: decoder jpeg not...

weixin_34383618的博客 688

ubuntu下安装pillow python 疑难杂症

参看ubuntu发行版本信息 lsb_release -aNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.4 LTS Release: 14.04 Codename: trusty工作中常用的centos,移植到ubuntu上面各种问题,简直抓狂,安装个pillow也是各种

Katios 1万+
上一篇: Jetson调用triton inference server详细笔记
下一篇: Jetson(ubuntu)下切换python版本方法
AI小笔记
AI小笔记 新星创作者: 人工智能技术领域 新星创作者: 人工智能技术领域
博客等级 码龄8年 1万+粉丝 154原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

AI小笔记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值