Python3安裝:zipimport.ZipImportError: can't decompress data; zlib not available

最近更新時間 2020-01-04 12:30:39

在Centos7下源碼編譯安裝Python3.8,make altinstall時報錯誤:

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

如下所示:

  File "", line 241, in load_module
  File "", line 709, in _get_module_code
  File "", line 570, in _get_data
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1

缺少zlib-devel包,安裝zlib-devel包:

yum install zlib-devel

安裝成功後重新執行 make altinstall命令。

rss_feed