Ubuntu16.04安装Python3.7碰到的问题(1):zipimport.ZipImportError: can't decompress data; zlib not available

安装python3.7的时候报错:

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

缺少zlib相关包

解决办法:

sudo apt-get install zlib*

主要是我搜的时候看到很多都用的是

yum -y install zlib*

然后我用yum命令又告诉我需要安装yum,后来才发现,CentOS系统中是用yum指令,Ubuntu是用apt-get,所以改成上面说的sudo apt-get install zlib*就成功了!
资料参照 There are no enabled repos,Run “yum repolist all” to see the repos you have.报错解决方案

你可能感兴趣的:(Ubuntu16.04安装Python3.7碰到的问题(1):zipimport.ZipImportError: can't decompress data; zlib not available)