環境:python2.7 + unbuntu
今天在Linux中安Python3的時候,出現了一個錯誤:zipimport.ZipImportError: can‘t decompress data; zlib not available
網上找了各種辦法都無法解決實際問題,例如
sudo apt-get install zlib*
錯誤:
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