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.

Install fails on OS X (zipimport.ZipImportError: can't decompress data; zlib not available)

See original GitHub issue

Using Mac OS Mojave 10.14.5, bundled_installer fails to install Python with the following errors:

BUILD FAILED (OS X 10.14.5 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/n0/xxh86gld3jb5rxnnp1rtfv4h0000gn/T/python-build.20190722131429.87401
Results logged to /var/folders/n0/xxh86gld3jb5rxnnp1rtfv4h0000gn/T/python-build.20190722131429.87401.log

Last 10 log lines:
  File "/private/var/folders/n0/xxh86gld3jb5rxnnp1rtfv4h0000gn/T/python-build.20190722131429.87401/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "/private/var/folders/n0/xxh86gld3jb5rxnnp1rtfv4h0000gn/T/python-build.20190722131429.87401/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
    default_pip=args.default_pip,
  File "/private/var/folders/n0/xxh86gld3jb5rxnnp1rtfv4h0000gn/T/python-build.20190722131429.87401/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/n0/xxh86gld3jb5rxnnp1rtfv4h0000gn/T/python-build.20190722131429.87401/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

==============================================
II. Creating self-contained EBCLI installation
==============================================
./bundled_installer: line 51: /Users/tomslot/.pyenv/versions/3.7.2/bin/python: No such file or directory
./bundled_installer: line 28: echo_with_indentation: command not found

Suggested workaround (installing zlib and setting CFLAGS) does not work for me.

PS. I also tried to execute:

python3 ebcli_installer.py                      

***********************************
1. Locating virtualenv installation
***********************************
ERROR: Could not find and "virtualenv" installed. Ensurevirtualenv is installed and that it is in PATH before executingthis script.

******************************************
2. Creating exclusive virtualenv for EBCLI
******************************************
/bin/sh: virtualenv: command not found

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

23reactions
drupaljicommented, Aug 26, 2019

If someone else face this problem, you need to:

export LDFLAGS="-L/usr/local/opt/zlib/lib" export CPPFLAGS="-I/usr/local/opt/zlib/include"

This way zlib will be available.

22reactions
BeyersNelcommented, Sep 11, 2019

The above in isolation did not solve this issue for me. This did though:

sudo rm -r /usr/local/opt/zlib brew install zlib export LDFLAGS="-L/usr/local/opt/zlib/lib" export CPPFLAGS="-I/usr/local/opt/zlib/include"

Same issue in this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pyenv zlib error on MacOS - xcode - Stack Overflow
I am trying to install Python 2.7.5 and 3.6.5 side-by-side on my MBP with with pyenv. pyenv Installation. Following How can I use...
Read more >
zipimport.ZipImportError: can't decompress data; zlib not ...
I run python3 get-pip.py to show the error message above, but it works for python get-pip.py . Yes, I can run yum search...
Read more >
[Solved][Linux] Python Installation Error: zipimport.ZipImportError
Today when I installing a specific Python version on Linux, I encountered the following error message: "zipimport.ZipImportError: can't ...
Read more >
SOLVED: OSX or macOS Sierra, error while installing python ...
Read how to solve the zipimport.ZipImportError: can't decompress data; zlib not available error while using pyenv to install a new python ...
Read more >
How to solve zipimport.ZipImportError: can't decompress data
When I pass the final command, sudo make install, it prints the error “zipimport.ZipImportError: can't 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