Python Installation FAQ (1): zipimport.ZipImportError: can not decompress data (this problem is not solved pip install unsuccessful)

Encountered in the installation package and other CentOS Linux system installed for the wrong reasons, mostly because of the lack dependencies cause, so for error: zipimport.ZipImportError: can not decompress data, because of the lack of relevant zlib Kit cause, you know the problem, then we only need to install the dependent packages,
1, open a terminal and enter the following command to install zlib dependent packages:

yum -y install zlib*

2, the installation package into the python, modify the path setup file Module:
Modules / Setup.dist (or Modules / Setup) document

vim Modules / setup or vim Modules / Setup.dist (I encountered here)

Locate the following line of code, remove the comment (in the last few lines Setup.dist prompt file):

# Zlib zlibmodule.c -I $ (prefix) / the include -L $ (exec_prefix) / lib -lz 
uncomment
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
Further, explain here, for the problem encountered during the installation of the Python installation, after installing the above dependencies, '
 to re-enter the terminal proceeds to the next installation package path of the python:
make && make install 

Recompile be installed,

Guess you like

Origin www.cnblogs.com/zmdComeOn/p/11710791.html