无法在Windows中安装枕头 [英] Can't install Pillow in Windows

查看:286
本文介绍了无法在Windows中安装枕头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装过程要求使用zlib,我什至设置&从Github克隆它.我是这一切的新手.

The installation process asks for zlib and I even setup & cloned it from Github. I'm new to all of this.

错误消息:

C:\Users\GThell\Pillow>pip install -e .
Obtaining file:///C:/Users/GThell/Pillow
Requirement already satisfied: olefile in c:\users\gthell\appdata\local\programs\python\python36\lib\site-packages (from Pillow==3.5.0.dev0)
Installing collected packages: Pillow
  Running setup.py develop for Pillow
    Complete output from command c:\users\gthell\appdata\local\programs\python\python36\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\GThell\\Pillow\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
    Single threaded build for windows
    running develop
    running egg_info
    writing Pillow.egg-info\PKG-INFO
    writing dependency_links to Pillow.egg-info\dependency_links.txt
    writing requirements to Pillow.egg-info\requires.txt
    writing top-level names to Pillow.egg-info\top_level.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'Pillow.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    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 'tox.ini'
    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\GThell\Pillow\setup.py", line 778, in <module>
        zip_safe=not debug_build(), )
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\develop.py", line 34, in run
        self.install_for_development()
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\develop.py", line 119, in install_for_development
        self.run_command('build_ext')
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\users\gthell\appdata\local\programs\python\python36\lib\distutils\command\build_ext.py", line 339, in run
        self.build_extensions()
      File "C:\Users\GThell\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\GThell\Pillow\setup.py", line 790, 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

推荐答案

错误消息底部的URL表示:

The URL at bottom of error message says:

Windows安装 我们提供适用于Windows的Pillow二进制文件,该文件针对在Wheel,Egg和可执行安装程序中的32位和64位版本的受支持的Python矩阵进行了编译.这些二进制文件包含所有可选库:

Windows Installation We provide Pillow binaries for Windows compiled for the matrix of supported Pythons in both 32 and 64-bit versions in wheel, egg, and executable installers. These binaries have all of the optional libraries included:

pip安装枕头

我会尝试这样做,以避免遇到诸如您遇到的依赖性问题.

I would try that, to avoid dependency problems such as you have run into.

edit:枕头仅支持Pillow> = 2.0.0< 3.5.0而不是3.6.0

edit: The pillow only support Pillow >= 2.0.0 < 3.5.0 and not 3.6.0

希望这项工作能够在Windows上进行实际测试.

edit: Hopefully this work, I was not able to actually test on Windows.

这篇关于无法在Windows中安装枕头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆