Focus on cloud service provider activities
Notes on website operation and maintenance

Solve the problem of "zipimport. ZipImportError" when CentOS7 compiles python

Lao Zuo has upgraded python 3.6 on a CentOS7 server. During the compilation process, "zipimport. ZipImportError: can't decompress data; The zlib not available "error prompt seems to be caused by the lack of packages. After searching various online tutorials, it was found that most of the problems could not be solved. Some solutions were to modify the configuration file and uncomment" zlib zlibmodule. c ", but I tried to solve them.

1. Error prompt

 Solve the problem of "zipimport. ZipImportError" when CentOS7 compiles python

2. The problem cannot be solved by modifying the configuration file

 Solve CentOS7 compiling python

3. Solution

yum install zlib zlib-devel -y

The required package can only be installed directly. Some online documents suggest installing the zlibc zlib1g dev package. My tests here are different. Maybe it can be installed in other environments. Finally, we can make install to compile python without error prompt.

 Solve CentOS7 compiling python

Vote for you
Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( one )
Do not reprint without permission: Lao Zuo's Notes » Solve the problem of "zipimport. ZipImportError" when CentOS7 compiles python


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge