在用pyenv安装Python3.6的时候遇到这个错误
zipimport.ZipImportError: can't decompress data; zlib not available
,是缺少zlib所致,但是,不是直接apt install zlib
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.我爱你
viencoding.com版权所有,允许转载,但转载请注明出处和原文链接: https://viencoding.com/article/69