今天在Linux中安Python3的时候,出现了一个错误:zipimport.ZipImportError: can‘t decompress data; 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

 

相关文章:

  • 2022-02-15
  • 2021-05-29
  • 2022-12-23
  • 2021-11-23
  • 2022-01-12
  • 2022-01-10
猜你喜欢
  • 2021-11-10
  • 2022-02-03
  • 2021-12-04
  • 2022-03-02
  • 2021-12-30
  • 2021-08-15
相关资源
相似解决方案