I had this issue on a redhat server while trying to make a python venv as a non-root user.
Here is a detailed output on why the venv creation fail.
$ python-venv/bin/python3 -Im ensurepip --upgrade --default-pip
Traceback (most recent call last):
File "/usr/lib64/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib64/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/lib64/python3.6/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/usr/lib64/python3.6/ensurepip/__init__.py", line 21, in <module>
_SETUPTOOLS_VERSION = _get_most_recent_wheel_version("setuptools")
File "/usr/lib64/python3.6/ensurepip/__init__.py", line 18, in _get_most_recent_wheel_version
return str(max(versions, key=distutils.version.LooseVersion))
I don't have a mean to verify if the python installation is correct, but I assume it isn't.