3

When I tried to use pyenv install, an error occurred. I'm not sure how to solve this problem. Any help will be appreciated.

DennisdeMacBook-Pro:~ Dennis$ pyenv install 3.5.2 Downloading Python-3.5.2.tar.xz... -> https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz Installing Python-3.5.2... BUILD FAILED (OS X 10.11.6 using python-build 20160130) Inspect or clean up the working tree at /var/folders/mj/mqpslr496bs1b2rwq3hxkm1w0000gn/T/python-build.20160810223509.6857 Results logged to /var/folders/mj/mqpslr496bs1b2rwq3hxkm1w0000gn/T/python-build.20160810223509.6857.log Last 10 log lines: File "/private/var/folders/mj/mqpslr496bs1b2rwq3hxkm1w0000gn/T/python-build.20160810223509.6857/Python-3.5.2/Lib/ensurepip/__main__.py", line 4, in <module> ensurepip._main() File "/private/var/folders/mj/mqpslr496bs1b2rwq3hxkm1w0000gn/T/python-build.20160810223509.6857/Python-3.5.2/Lib/ensurepip/__init__.py", line 209, in _main default_pip=args.default_pip, File "/private/var/folders/mj/mqpslr496bs1b2rwq3hxkm1w0000gn/T/python-build.20160810223509.6857/Python-3.5.2/Lib/ensurepip/__init__.py", line 116, in bootstrap _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/private/var/folders/mj/mqpslr496bs1b2rwq3hxkm1w0000gn/T/python-build.20160810223509.6857/Python-3.5.2/Lib/ensurepip/__init__.py", line 40, in _run_pip import pip zipimport.ZipImportError: can't decompress data; zlib not available make: *** [install] Error 1 

1 Answer 1

1

Use Xcode:

xcode-select --install 
Sign up to request clarification or add additional context in comments.

2 Comments

I have xcode installed but I still get this error. Mac OS Mojave (10.14).
This is due to missing headers in /include. See this response and the rest of the issue thread.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.