在Python 3.4中安装Pillow,如何通过此错误?

时间:2017-01-29 06:19:05

标签: module installation pip python-3.4 pillow

所以,当我收到错误时,我正在尝试安装PyAutoGui。我发现枕头是问题所在。我在安装时遇到错误,如何解决此问题并成功安装Pillow?在cmd中执行时: C:\Python34\Scripts\pip install Pillow 我收到以下日志:

copying PIL\IcnsImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\IcoImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\Image.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageChops.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageCms.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageColor.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageDraw.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageDraw2.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageEnhance.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageFile.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageFilter.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageFont.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageGrab.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageMath.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageMode.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageMorph.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageOps.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImagePalette.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImagePath.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageQt.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageSequence.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageShow.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageStat.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageTk.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageTransform.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImageWin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\ImtImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\IptcImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\Jpeg2KImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\JpegImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\JpegPresets.py -> build\lib.win-amd64-3.4\PIL
copying PIL\McIdasImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\MicImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\MpegImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\MpoImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\MspImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\OleFileIO.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PaletteFile.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PalmImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PcdImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PcfFontFile.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PcxImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PdfImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PixarImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PngImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PpmImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PsdImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PSDraw.py -> build\lib.win-amd64-3.4\PIL
copying PIL\PyAccess.py -> build\lib.win-amd64-3.4\PIL
copying PIL\SgiImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\SpiderImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\SunImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\TarIO.py -> build\lib.win-amd64-3.4\PIL
copying PIL\TgaImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\TiffImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\TiffTags.py -> build\lib.win-amd64-3.4\PIL
copying PIL\WalImageFile.py -> build\lib.win-amd64-3.4\PIL
copying PIL\WebPImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\WmfImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\XbmImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\XpmImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\XVThumbImagePlugin.py -> build\lib.win-amd64-3.4\PIL
copying PIL\_binary.py -> build\lib.win-amd64-3.4\PIL
copying PIL\_tkinter_finder.py -> build\lib.win-amd64-3.4\PIL
copying PIL\_util.py -> build\lib.win-amd64-3.4\PIL
copying PIL\__init__.py -> build\lib.win-amd64-3.4\PIL
running egg_info
writing top-level names to Pillow.egg-info\top_level.txt
writing requirements to Pillow.egg-info\requires.txt
writing dependency_links to Pillow.egg-info\dependency_links.txt
writing Pillow.egg-info\PKG-INFO
warning: manifest_maker: standard file '-c' not found

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 zlib,
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 "C:\Users\User\AppData\Local\Temp\pip_build_User\Pillow\setup.py", line 779, in <module>
    zip_safe=not debug_build(), )
  File "C:\Python34\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Python34\lib\distutils\dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Python34\lib\site-packages\setuptools\command\install.py", line 54, in run
    return _install.run(self)
  File "C:\Python34\lib\distutils\command\install.py", line 554, in run
    self.run_command('build')
  File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Python34\lib\distutils\command\build.py", line 126, in run
    self.run_command(cmd_name)
  File "C:\Python34\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Python34\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "C:\Python34\lib\distutils\command\build_ext.py", line 348, in run
    self.build_extensions()
  File "C:\Users\User\AppData\Local\Temp\pip_build_User\Pillow\setup.py", line 549, in build_extensions
    raise RequiredDependencyException(f)
__main__.RequiredDependencyException: zlib

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\User\AppData\Local\Temp\pip_build_User\Pillow\setup.py", line 791, in <module>
    raise RequiredDependencyException(msg)
__main__.RequiredDependencyException:

The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.

Please see the install instructions at:
   http://pillow.readthedocs.io/en/latest/installation.html


----------------------------------------
Cleaning up...
Command C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\User\\AppData\\Local\\Temp\\pip_build_User\\Pillow\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\User\AppData\Local\Temp\pip-r710478a-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in C:\Users\User\AppData\Local\Temp\pip_build_User\Pillow
Storing debug log for failure in C:\Users\User\pip\pip.log
C:\Users\User>

1 个答案:

答案 0 :(得分:0)

刚刚重新安装了一切。立即行动。