I am getting above error while setuptools replace disutils when execute ./stack.sh. I am using Ubuntu Server 20.04 VM and following this link. There is nothing much available on internet about this error. Any help will be appreciated.
The entire stacktrace looks like
/usr/local/lib/python3.8/dist-packages/_distutils_hack/__init__.py:24:
UserWarning: Distutils was imported before Setuptools, but importing
Setuptools also replaces the `distutils` module in `sys.modules`. This
may lead to undesirable behaviors or errors. To avoid these issues,
avoid using distutils directly, ensure that setuptools is installed in
the traditional way (e.g. not an editable install), and/or make sure
that setuptools is always imported before distutils.
warnings.warn(
/usr/local/lib/python3.8/dist-packages/_distutils_hack/__init__.py:36:
UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
File "/opt/stack/devstack/files/get-pip.py", line 27081, in <module>
main()
File "/opt/stack/devstack/files/get-pip.py", line 139, in main
bootstrap(tmpdir=tmpdir)
File "/opt/stack/devstack/files/get-pip.py", line 120, in bootstrap
args = determine_pip_install_arguments()
File "/opt/stack/devstack/files/get-pip.py", line 65, in
determine_pip_install_arguments
import setuptools # noqa
File "/usr/local/lib/python3.8/dist-packages/setuptools/__init__.py",
line 8, in <module>
import _distutils_hack.override # noqa: F401
File "/usr/local/lib/python3.8/dist-
packages/_distutils_hack/override.py", line 1, in <module>
__import__('_distutils_hack').do_override()
File "/usr/local/lib/python3.8/dist-
packages/_distutils_hack/__init__.py", line 73, in do_override
ensure_local_distutils()
File "/usr/local/lib/python3.8/dist-
packages/_distutils_hack/__init__.py", line 61, in
ensure_local_distutils
assert '_distutils' in core.__file__, core.__file__
AssertionError: /usr/lib/python3.8/distutils/core.py
++./stack.sh:main:789 err_trap
++./stack.sh:err_trap:562 local r=1
++./stack.sh:err_trap:563 set +o xtrace
stack.sh failed
Error on exit
World dumping... see /opt/stack/logs/worlddump-2022-01-07-072759.txt for
details`
The log file is showing following warnings
File System Summary
===================
WARN: Device /dev/loop0 (/snap/core18/1880) is 100% full, might be an
issue
WARN: Device /dev/loop1 (/snap/gnome-3-34-1804/36) is 100% full, might
be an issue
WARN: Device /dev/loop2 (/snap/gtk-common-themes/1506) is 100% full,
might be an issue
WARN: Device /dev/loop3 (/snap/snap-store/467) is 100% full, might be an
issue
WARN: Device /dev/loop4 (/snap/snapd/8542) is 100% full, might be an
issue
WARN: Device /dev/loop5 (/snap/snapd/14295) is 100% full, might be an
issue
WARN: Device /dev/loop6 (/snap/core18/2253) is 100% full, might be an
issue
WARN: Device /dev/loop7 (/snap/bare/5) is 100% full, might be an issue
WARN: Device /dev/loop8 (/snap/core20/1270) is 100% full, might be an
issue
WARN: Device /dev/loop9 (/snap/gtk-common-themes/1519) is 100% full,
might be an issue
WARN: Device /dev/loop10 (/snap/gnome-3-34-1804/77) is 100% full, might
be an issue
WARN: Device /dev/loop11 (/snap/snap-store/558) is 100% full, might be
an issue
WARN: Device /dev/loop12 (/snap/gnome-3-38-2004/87) is 100% full, might
be an issue
But no exact error statement.