2015-10-02 26 views
12

Tôi đã cố gắng để cài đặt các loại gối mô-đun trên máy Mac của tôi (chạy cài đặt một tươi của El Capitan và python 3.5) trong một thời gian bây giờ. Sử dụng pip3 cài đặt Gối, tôi nhận được một lỗi nói rằng zlib không được tìm thấy, mà sau đó gây ra các cài đặt để hủy bỏ. Tôi đã cài đặt Xcode, vì vậy về mặt lý thuyết zlib đã được cài đặt, và khi tôi cài đặt nó với brew pip vẫn không hoạt động (vì vậy tôi đã gỡ cài đặt). Nó hoạt động tốt cho đến khi nó được đến đây:Zlib lỗi khi cài đặt gối trên Mac

writing Pillow.egg-info/PKG-INFO 
writing dependency_links to Pillow.egg-info/dependency_links.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' 
writing manifest file 'Pillow.egg-info/SOURCES.txt' 
copying PIL/OleFileIO-README.md -> build/lib.macosx-10.6-intel-3.5/PIL 
running build_ext 
Traceback (most recent call last): 
    File "<string>", line 1, in <module> 
    File "/private/tmp/pip-build-1yfcb2pj/Pillow/setup.py", line 767, in <module> 
    zip_safe=not debug_build(), 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup 
    dist.run_commands() 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands 
    self.run_command(cmd) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command 
    cmd_obj.run() 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/setuptools-18.3.2-py3.5.egg/setuptools/command/install.py", line 61, in run 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/install.py", line 539, in run 
    self.run_command('build') 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command 
    self.distribution.run_command(command) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command 
    cmd_obj.run() 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build.py", line 135, in run 
    self.run_command(cmd_name) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 313, in run_command 
    self.distribution.run_command(command) 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 974, in run_command 
    cmd_obj.run() 
    File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/command/build_ext.py", line 338, in run 
    self.build_extensions() 
    File "/private/tmp/pip-build-1yfcb2pj/Pillow/setup.py", line 515, in build_extensions 
    % (f, f)) 
ValueError: --enable-zlib requested but zlib not found, aborting. 

---------------------------------------- 
Command  "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-1yfcb2pj/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-oxzqi2c0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-1yfcb2pj/Pillow 

Bất kỳ ý tưởng tại sao lỗi và cách khắc phục?

Trả lời

19

Chạy

$ xcode-select --install 

dường như đã giải quyết được vấn đề đối với tôi.

+0

làm việc cho những người đàn ông quá, thanks a lot :) –

+0

giúp tôi giải quyết một vấn đề Capitan el quá - nhưng tại sao, những gì đang xcode-chọn? – Lonoshea

+0

xcode-select quản lý thư mục nhà phát triển hoạt động cho các công cụ Xcode và BSD. - cài đặt sẽ mở ra hộp thoại giao diện người dùng để yêu cầu cài đặt tự động các công cụ dành cho nhà phát triển dòng lệnh. – kayluhb

Các vấn đề liên quan