zipimport.ZipImportError: can't decompress data; zlib not available on macOS
See original GitHub issueInspect 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:
- Created 4 years ago
- Reactions:13
- Comments:25 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
@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)