问题描述
在centos7.6用python3.7.3源码执行make install时报如下错误:
(cd /usr/local/share/man/man1; ln -s python3.7.1 python3.1) if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--upgrade" ;; \ install|*) ensurepip="" ;; \ esac; \ ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Traceback (most recent call last): File "/home/Python-3.7.3/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/home/Python-3.7.3/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/Python-3.7.3/Lib/ensurepip/__main__.py", line 5, in sys.exit(ensurepip._main()) File "/home/Python-3.7.3/Lib/ensurepip/__init__.py", line 204, in _main default_pip=args.default_pip, File "/home/Python-3.7.3/Lib/ensurepip/__init__.py", line 117, in _bootstrap return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths) File "/home/Python-3.7.3/Lib/ensurepip/__init__.py", line 27, in _run_pip import pip._internal zipimport.ZipImportError: can't decompress data; zlib not available make: *** [install] Error 1
系统版本
[root@devEnv ]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
python版本
Python-3.7.3
问题
解决方法
yum install zlib zlib-devel -y