今天在新装Ubuntu的机器上安装python,make Install失败了,报错zlib not available, 在网上找到了大神的解决办法,记录在这里。
错误:
zipimport.ZipImportError: can't decompress data; zlib not available
Makefile:1079: recipe for target 'install' failed
make: *** [install] Error 1
解决办法:安装依赖
1 sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
2 libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
3 xz-utils tk-dev
重新 make && make install
参考:https://github.com/pyenv/pyenv/wiki/Common-build-problems
macOS
1 xcode-select --install
2 brew update
3 brew install pyenv
4 pyenv install 3.6.3
5 pyenv global 3.6.3
引用自:https://www.cnblogs.com/jellydong/p/7724169.html