[Solved] python Install pip Error: zipimport.ZipImportError: can’t decompress data; zlib not available

Phenomenon:

Solution:

1. Install dependent packages

yum -y install zlib*

2. Recompile Python

#The catalog is based on the production environment itself
[[email protected] software]# cd Python/
[[email protected] Python]# ./configure --prefix=/usr/local/python3

#Compile and install
[[email protected] Python]# make && make install

# re-install
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

Similar Posts: