2015-10-29 8 views
40

Ich habe vor kurzem versucht, Pillow 3.0.0 auf meinem Ubuntu 14.04 zu installieren. Egal, was ich tue (download und versuchen, "sudo python setup.py installieren" oder "sudo -H pip installieren Pillow == 3.0.0 - no-cache-dir") jedes Mal bekomme ich Fehler:Python Ubuntu Fehler installieren Pillow 3.0.0

copying PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-2.7/PIL 
    running egg_info 
    writing Pillow.egg-info/PKG-INFO 
    writing top-level names to Pillow.egg-info/top_level.txt 
    writing dependency_links to Pillow.egg-info/dependency_links.txt 
    warning: manifest_maker: standard file '-c' not found 

    reading manifest file 'Pillow.egg-info/SOURCES.txt' 
    reading manifest template 'MANIFEST.in' 
    writing manifest file 'Pillow.egg-info/SOURCES.txt' 
    copying PIL/OleFileIO-README.md -> build/lib.linux-x86_64-2.7/PIL 
    running build_ext 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "/tmp/pip-build-3waMkf/Pillow/setup.py", line 767, in <module> 
     zip_safe=not debug_build(), 
     File "/usr/lib/python2.7/distutils/core.py", line 151, in setup 
     dist.run_commands() 
     File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands 
     self.run_command(cmd) 
     File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command 
     cmd_obj.run() 
     File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 61, in run 
     return orig.install.run(self) 
     File "/usr/lib/python2.7/distutils/command/install.py", line 601, in run 
     self.run_command('build') 
     File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command 
     self.distribution.run_command(command) 
     File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command 
     cmd_obj.run() 
     File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run 
     self.run_command(cmd_name) 
     File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command 
     self.distribution.run_command(command) 
     File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command 
     cmd_obj.run() 
     File "/usr/lib/python2.7/distutils/command/build_ext.py", line 337, in run 
     self.build_extensions() 
     File "/tmp/pip-build-3waMkf/Pillow/setup.py", line 515, in build_extensions 
     % (f, f)) 
    ValueError: --enable-zlib requested but zlib not found, aborting. 

    ---------------------------------------- 
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-3waMkf/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-S_sHo7-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-3waMkf/Pillow 
+0

installieren Diese Frage wurde so wegen einer geheimen Hut upvolotiert.) –

Antwort

66

Haben Sie die Abhängigkeiten für Kissen installiert? Sie können sie von

$ sudo apt-get build-dep python-imaging 
$ sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev 
+1

Danke! Das war's. Sie waren sehr hilfreich :) – user3613919

+0

Was ist, wenn ich ein virtuelles env benutze und nur Pillow verwenden möchte, ohne irgendetwas in meinem System zu installieren? –

+3

Die obigen sind systemweite Abhängigkeiten, was 'pip' ist, es installiert nur das Modul/die Bibliothek. Manchmal erfordern Bibliotheken die Verwendung von Dingen auf Systemebene, die möglicherweise nicht standardmäßig installiert sind. Unabhängig davon, ob Sie ein virtualenv verwenden oder es global installieren, müssen Sie diese Bibliotheken installieren, um Pillow zu verwenden. –