Score:0

Openstack Installation via Devstack: AssertionError /usr/lib/python3.8/distutils/core.py

us flag

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.

us flag
Those are warning, is it possible to share the full log, you can use pastebin service like paste.openstack.org
Score:0
cn flag

I have this issue too, exactly the same.

I got another error before this. It's about host IP, after i fixed it, i ran to this error, like you :v The point is the first error did something and that make it mismatch pip (package installer for Python) of openstack with pip of ubuntu, which cause new error.

I don't know exactly how to fix pip. So i create a whole new VM and start over again, then it succeeded! I use VM of Azure so it fast and i can quickly start over. Anyway, if you can't fix problem with pip, you should try again on a whole new VM, it should not have this error

By the way, i use server Ubuntu 20.04.3 LTS like you too and other info are:

  • Python 3.8.10
  • 2 vCPUs, 8 GB RAM (You should use at least 6 RAM or else you will get error 'c-api did not start')
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.