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 in a CentOS7 server python Occurs during the compilation of version 3.6“ 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, let's make install to compile python There is no error prompt.

 Solve CentOS7 compiling python

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