Problem description
In CentOS 7.6, when you execute make install with Python 3.7.3 source code, the following error will be reported:
(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
System version
[root@devEnv ]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core)
Python version
Python-3.7.3
Questions
Solutions
yum install zlib zlib-devel -y
Similar Posts:
- Pyenv build failed solution
- Python.exe Error: No module named pip.__main__; ‘pip’ is a package and cannot be directly executed
- [Solved] Centos6: Python 2.6 upgrade to 3.7, error handling [no module named ‘_ctypes’]
- [Solved] Pyinstaller package Error: AttributeError: ‘str’ object has no attribute ‘decode’
- [Solved] ModuleNotFoundError: No module named’usysconfigdata u x86 64-u-gnu’
- How to Solve ModuleNotFoundError: No module named ‘pip._internal’
- Python Via get-pip.py Install pip Error: zipimport.ZipImportError: can‘t decompress data; zlib not availabl
- How to Solve pip3 ImportError: cannot import name ‘main’
- [Solved] Exception: Jupyter command `jupyter-notbook` not found.