如何在Windows上通过MobaXTerm安装PIL或Pillow?

时间:2017-02-28 08:24:36

标签: python python-3.x python-imaging-library pillow

如何在带有MobaXTerm的Windows上使用Python 3.4.5安装PIL或Pillow?

我已经尝试了python3 -m pip install Pillow解决方法以及python3 -m pip install PIL,我收到一条错误消息/bin/python3: No module named pip.

我刚刚输入错误的命令,还是我需要做些什么来在Windows上使用MobaXTerm安装这些库?

编辑:我有点工作,但它不会安装Pillow或PIL。

对于PIL,它给了我:

Collecting PIL
  Could not find a version that satisfies the requirement PIL (from versions: )
No matching distribution found for PIL

而对于Pillow,它给了我这个文本墙:

Collecting Pillow
  Using cached Pillow-4.0.0.tar.gz
Requirement already satisfied: olefile in /usr/lib/python3.4/site-packages (from Pillow)
Building wheels for collected packages: Pillow
  Running setup.py bdist_wheel for Pillow ... error
  Complete output from command /bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xetzsf44/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/tmpg30o2jx1pip-wheel- --python-tag cp34:
  Single threaded build for windows
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.cygwin-2.6.0-i686-3.4
  creating build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/BdfFontFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/BmpImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/BufrStubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ContainerIO.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/CurImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/DcxImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/DdsImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/EpsImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ExifTags.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/features.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/FitsStubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/FliImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/FontFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/FpxImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/FtexImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/GbrImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/GdImageFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/GifImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/GimpGradientFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/GimpPaletteFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/GribStubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/Hdf5StubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/IcnsImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/IcoImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/Image.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageChops.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageCms.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageColor.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageDraw.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageDraw2.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageEnhance.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageFilter.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageFont.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageGrab.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageMath.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageMode.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageMorph.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageOps.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImagePalette.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImagePath.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageQt.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageSequence.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageShow.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageStat.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageTk.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageTransform.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImageWin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/ImtImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/IptcImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/Jpeg2KImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/JpegImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/JpegPresets.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/McIdasImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/MicImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/MpegImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/MpoImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/MspImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/OleFileIO.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PaletteFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PalmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PcdImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PcfFontFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PcxImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PdfImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PixarImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PngImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PpmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PsdImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PSDraw.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/PyAccess.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/SgiImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/SpiderImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/SunImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/TarIO.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/TgaImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/TiffImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/TiffTags.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/WalImageFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/WebPImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/WmfImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/XbmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/XpmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/XVThumbImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/_binary.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/_tkinter_finder.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/_util.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  copying PIL/__init__.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
  running egg_info
  writing dependency_links to Pillow.egg-info/dependency_links.txt
  writing requirements to Pillow.egg-info/requires.txt
  writing Pillow.egg-info/PKG-INFO
  writing top-level names to Pillow.egg-info/top_level.txt
  reading manifest file 'Pillow.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching '*.sh'
  no previously-included directories found matching 'docs/_static'
  warning: no previously-included files found matching '.coveragerc'
  warning: no previously-included files found matching '.editorconfig'
  warning: no previously-included files found matching '.landscape.yaml'
  warning: no previously-included files found matching 'appveyor.yml'
  warning: no previously-included files found matching 'build_children.sh'
  warning: no previously-included files found matching 'tox.ini'
  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
  writing manifest file '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:
     http://pillow.readthedocs.io/en/latest/installation.html

  Traceback (most recent call last):
    File "/tmp/pip-build-xetzsf44/Pillow/setup.py", line 779, in <module>
      zip_safe=not debug_build(), )
    File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.4/site-packages/wheel/bdist_wheel.py", line 179, in run
      self.run_command('build')
    File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.4/distutils/command/build.py", line 126, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.4/distutils/command/build_ext.py", line 339, in run
      self.build_extensions()
    File "/tmp/pip-build-xetzsf44/Pillow/setup.py", line 549, 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-xetzsf44/Pillow/setup.py", line 791, 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:
     http://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 /bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xetzsf44/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-qn77j4nh-record/install-record.txt --single-version-externally-managed --compile:
    Single threaded build for windows
    running install
    running build
    running build_py
    creating build
    creating build/lib.cygwin-2.6.0-i686-3.4
    creating build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/BdfFontFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/BmpImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/BufrStubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ContainerIO.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/CurImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/DcxImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/DdsImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/EpsImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ExifTags.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/features.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/FitsStubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/FliImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/FontFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/FpxImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/FtexImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/GbrImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/GdImageFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/GifImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/GimpGradientFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/GimpPaletteFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/GribStubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/Hdf5StubImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/IcnsImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/IcoImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/Image.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageChops.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageCms.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageColor.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageDraw.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageDraw2.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageEnhance.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageFilter.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageFont.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageGrab.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageMath.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageMode.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageMorph.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageOps.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImagePalette.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImagePath.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageQt.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageSequence.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageShow.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageStat.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageTk.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageTransform.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImageWin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/ImtImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/IptcImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/Jpeg2KImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/JpegImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/JpegPresets.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/McIdasImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/MicImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/MpegImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/MpoImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/MspImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/OleFileIO.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PaletteFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PalmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PcdImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PcfFontFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PcxImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PdfImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PixarImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PngImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PpmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PsdImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PSDraw.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/PyAccess.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/SgiImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/SpiderImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/SunImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/TarIO.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/TgaImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/TiffImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/TiffTags.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/WalImageFile.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/WebPImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/WmfImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/XbmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/XpmImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/XVThumbImagePlugin.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/_binary.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/_tkinter_finder.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/_util.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    copying PIL/__init__.py -> build/lib.cygwin-2.6.0-i686-3.4/PIL
    running egg_info
    writing Pillow.egg-info/PKG-INFO
    writing requirements to Pillow.egg-info/requires.txt
    writing top-level names to Pillow.egg-info/top_level.txt
    writing dependency_links to Pillow.egg-info/dependency_links.txt
    reading manifest file 'Pillow.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.sh'
    no previously-included directories found matching 'docs/_static'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.landscape.yaml'
    warning: no previously-included files found matching 'appveyor.yml'
    warning: no previously-included files found matching 'build_children.sh'
    warning: no previously-included files found matching 'tox.ini'
    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
    writing manifest file '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:
       http://pillow.readthedocs.io/en/latest/installation.html

    Traceback (most recent call last):
      File "/tmp/pip-build-xetzsf44/Pillow/setup.py", line 779, in <module>
        zip_safe=not debug_build(), )
      File "/usr/lib/python3.4/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.4/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.4/distutils/command/install.py", line 539, in run
        self.run_command('build')
      File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/distutils/command/build.py", line 126, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.4/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.4/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.4/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/tmp/pip-build-xetzsf44/Pillow/setup.py", line 549, 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-xetzsf44/Pillow/setup.py", line 791, 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:
       http://pillow.readthedocs.io/en/latest/installation.html



    ----------------------------------------
Command "/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-xetzsf44/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-qn77j4nh-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-xetzsf44/Pillow/

这里有什么问题?对于easy_install也是如此。

1 个答案:

答案 0 :(得分:0)

首先,不要使用未维护的PIL,请使用维护的Pillow前叉。

其次,&#34; pip install pillow&#34;正在发生什么?它是否正在下载源zip并尝试从源代码构建,这涉及编译C codd。虽然这在Linux和Mac上相当容易,但为Windows设置编译器会非常困难。

然而,Pillow也作为预编译的二进制文件发布,称为&#34; wheels&#34;。通常pip和Windows将从wheel安装,我知道它适用于bogstandard cmd.exe,但看起来像pip / MobaXTerm有问题。

因此,直接从https://pypi.python.org/pypi/Pillow/下载Windows轮盘文件(cp34是Python 3.4)并运行&#34; pip install name.whl&#34;。