question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

zipimport.ZipImportError: can't decompress data; zlib not available on macOS

See original GitHub issue
Inspect or clean up the working tree at /var/folders/n3/ws0911_179dfk_rfxwhq6dvr0000gn/T/python-build.20190523131052.99380
Results logged to /var/folders/n3/ws0911_179dfk_rfxwhq6dvr0000gn/T/python-build.20190523131052.99380.log

Last 10 log lines:
  File "/private/var/folders/n3/ws0911_179dfk_rfxwhq6dvr0000gn/T/python-build.20190523131052.99380/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "/private/var/folders/n3/ws0911_179dfk_rfxwhq6dvr0000gn/T/python-build.20190523131052.99380/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
    default_pip=args.default_pip,
  File "/private/var/folders/n3/ws0911_179dfk_rfxwhq6dvr0000gn/T/python-build.20190523131052.99380/Python-3.7.2/Lib/ensurepip/__init__.py", line 117, in _bootstrap
    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/private/var/folders/n3/ws0911_179dfk_rfxwhq6dvr0000gn/T/python-build.20190523131052.99380/Python-3.7.2/Lib/ensurepip/__init__.py", line 27, in _run_pip
    import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
   Exiting due to failure

I followed the note but still doesn’t work. I’m using macOS v10.14.4.

> ~/Code  echo $LDFLAGS
-L/usr/local/opt/zlib/lib
> ~/Code  echo $CPPFLAGS
-I/usr/local/opt/zlib/include

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:13
  • Comments:25 (8 by maintainers)

github_iconTop GitHub Comments

44reactions
anton-syrovatkacommented, Dec 9, 2019

I had the same issue with installing python from this script. This helped me bypass the issue: brew install pyenv pyenv install 3.7.2

15reactions
ursulaccommented, May 31, 2019

@Rokt33r I also had the zlib error but I was simply able to run brew install awsebcli and it works now (from here https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install-osx.html)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Install fails on OS X (zipimport.ZipImportError: can't ... - GitHub
Using Mac OS Mojave 10.14.5, bundled_installer fails to install Python ... ZipImportError: can't decompress data; zlib not available) #41.
Read more >
pyenv zlib error on MacOS - xcode - Stack Overflow
There are some possible solutions mentioned for the missing zlib error. I have the same ZipImportError but with the following command ...
Read more >
zipimport.ZipImportError: can't decompress data; zlib not ...
The zlib module is an optional feature for python and it seems that the version of python3.5 in RHEL 6.6 does not include...
Read more >
How to solve zipimport.ZipImportError: can't decompress data
When I pass the final command, sudo make install, it shows "zipimport.ZipImportError: can't decompress data; zlib not available."
Read more >
[Solved][Linux] Python Installation Error: zipimport.ZipImportError
ZipImportError: can't decompress data" ... .com/questions/291737/zipimport-zipimporterror-cant-decompress-data-zlib-not-available ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found