zipimport.ZipImportError: can't decompress data; zlib not available 解决

2019-02-16 09:30:45   错误异常

在用pyenv安装Python3.6的时候遇到这个错误zipimport.ZipImportError: can't decompress data; zlib not available ,是缺少zlib所致,但是,不是直接apt install zlib

对于Ubuntu16,Python3.6

sudo apt-get install zlib1g-dev

其他错误

你还可能遇到:

WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

请安装全家桶

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev

更多问题解决: https://github.com/pyenv/pyenv/wiki/Common-build-problems


更多:vien.我爱你

vien.tech版权所有,允许转载,但转载请注明出处和原文链接: https://vien.tech/article/69
欢迎小伙伴们在下方评论区留言 ~ O(∩_∩)O
文章对我有帮助, 点此请博主吃包辣条 ~ O(∩_∩)O

猜你喜欢


评论

There are no comments yet.
未登录

登录后即可发表评论

登录或注册