Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
496 views
in Technique[技术] by (71.8m points)

python - Can't install Pillow in Windows

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

Error message:

C:UsersGThellPillow>pip install -e .
Obtaining file:///C:/Users/GThell/Pillow
Requirement already satisfied: olefile in c:usersgthellappdatalocalprogramspythonpython36libsite-packages (from Pillow==3.5.0.dev0)
Installing collected packages: Pillow
  Running setup.py develop for Pillow
    Complete output from command c:usersgthellappdatalocalprogramspythonpython36python.exe -c "import setuptools, tokenize;__file__='C:\Users\GThell\Pillow\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('
', '
');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
    Single threaded build for windows
    running develop
    running egg_info
    writing Pillow.egg-infoPKG-INFO
    writing dependency_links to Pillow.egg-infodependency_links.txt
    writing requirements to Pillow.egg-info
equires.txt
    writing top-level names to Pillow.egg-infoop_level.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'Pillow.egg-infoSOURCES.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-infoSOURCES.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:UsersGThellPillowsetup.py", line 778, in <module>
        zip_safe=not debug_build(), )
      File "c:usersgthellappdatalocalprogramspythonpython36libdistutilscore.py", line 148, in setup
        dist.run_commands()
      File "c:usersgthellappdatalocalprogramspythonpython36libdistutilsdist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:usersgthellappdatalocalprogramspythonpython36libdistutilsdist.py", line 974, in run_command
        cmd_obj.run()
      File "c:usersgthellappdatalocalprogramspythonpython36libsite-packagessetuptoolscommanddevelop.py", line 34, in run
        self.install_for_development()
      File "c:usersgthellappdatalocalprogramspythonpython36libsite-packagessetuptoolscommanddevelop.py", line 119, in install_for_development
        self.run_command('build_ext')
      File "c:usersgthellappdatalocalprogramspythonpython36libdistutilscmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:usersgthellappdatalocalprogramspythonpython36libdistutilsdist.py", line 974, in run_command
        cmd_obj.run()
      File "c:usersgthellappdatalocalprogramspythonpython36libdistutilscommanduild_ext.py", line 339, in run
        self.build_extensions()
      File "C:UsersGThellPillowsetup.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:UsersGThellPillowsetup.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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

use:

easy_install pillow

pip doesn't work somehow


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...