aws-elastic-beanstalk-cli-setup: zipimport.ZipImportError: can't decompress data; zlib not available on macOS
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
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 13
- Comments: 25 (8 by maintainers)
Commits related to this issue
- Update package version to v0.1.2 This release fixes: 1. Issue involving spaces within virtualenv DEST_DIR path ( Issue #20 ) 2. Non-determinism involved in choosing Python executable to create vi... — committed to aws/aws-elastic-beanstalk-cli-setup by rahulrajaram 5 years ago
- Add instructions to install missing libraries on Linux/OS X A lot of users have reported installation difficulties owing to absence of OpenSSL, bzip2, etc. This commit adds a Troubleshooting section ... — committed to aws/aws-elastic-beanstalk-cli-setup by rahulrajaram 5 years ago
- Add instructions to install missing libraries on Linux/OS X A lot of users have reported installation difficulties owing to absence of OpenSSL, bzip2, etc. This commit adds a Troubleshooting section ... — committed to aws/aws-elastic-beanstalk-cli-setup by rahulrajaram 5 years ago
- Add instructions to install missing libraries on Linux/OS X A lot of users have reported installation difficulties owing to absence of OpenSSL, bzip2, etc. This commit adds a Troubleshooting section ... — committed to aws/aws-elastic-beanstalk-cli-setup by rahulrajaram 5 years ago
- Add instructions to install missing libraries on Linux/OS X A lot of users have reported installation difficulties owing to absence of OpenSSL, bzip2, etc. This commit adds a Troubleshooting section ... — committed to aws/aws-elastic-beanstalk-cli-setup by rahulrajaram 5 years ago
- readme add Troubleshooting for zlib on mac based on #23 — committed to novasdream/aws-elastic-beanstalk-cli-setup by novasdream 3 years ago
I had the same issue with installing python from this script. This helped me bypass the issue:
brew install pyenvpyenv install 3.7.2@Rokt33r I also had the zlib error but I was simply able to run
brew install awsebcliand it works now (from here https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install-osx.html)My solution on Mojave (10.14) is similar to @rahulrajaram , but only link the lib and include folder. For me, the issue is with zlib. You can use the following commands.
I find it easier to just install the
pyenvpackage and install the required python version on my own.Please take note your zlib and python version may vary.
Thank you, this solved the issue for me 👍
You get around the Python installation problem by installing Python through other means (e.g.
brew install python. Note that usually, OS X comes with a Python 2.7, so you might get away without have to do this). Then:I recommend using the
ebcli_installer.pyscript rather thanbrew install awsebclito install the EB CLI precisely for the reasons listed here.I remove zlib and install it again. Then I’m seeing another error…
Works for me! thanks!
@Rokt33r , glad that worked.
I’d like to keep this Issue open since, aside from the Open SSL issue, there are minor usability issues that need to be fixed.
It works for me! Thanks! 😃