What is considered a supported version of Python? Would Python3.9 from upstream be considered a supported version?
That said, I re-tested today and it appears that the issue no longer exists. Interestingly enough, there was a new image that was released yesterday - ami-03e9149278a6f457c (Date 20240521) root@ip-IP-MASKED:~# apt-cache search python3.9 python3-distutils - distutils package for Python 3.x python3-gdbm - GNU dbm database support for Python 3.x python3-lib2to3 - Interactive high-level object-oriented language (lib2to3) python3-tk - Tkinter - Writing Tk applications with Python 3.x idle-python3.9 - IDE for Python (v3.9) using Tkinter libpython3.9 - Shared Python runtime library (version 3.9) libpython3.9-dbg - Debug Build of the Python Interpreter (version 3.9) libpython3.9-dev - Header files and a static library for Python (v3.9) libpython3.9-minimal - Minimal subset of the Python language (version 3.9) libpython3.9-stdlib - Interactive high-level object-oriented language (standard library, version 3.9) libpython3.9-testsuite - Testsuite for the Python standard library (v3.9) python3.9 - Interactive high-level object-oriented language (version 3.9) python3.9-dbg - Debug Build of the Python Interpreter (version 3.9) python3.9-dev - Header files and a static library for Python (v3.9) python3.9-doc - Documentation for the high-level object-oriented language Python (v3.9) python3.9-examples - Examples for the Python language (v3.9) python3.9-full - Python Interpreter with complete class library (version 3.9) python3.9-minimal - Minimal subset of the Python language (version 3.9) python3.9-venv - Interactive high-level object-oriented language (pyvenv binary, version 3.9) root@ip-IP-MASKED:~# systemctl status cloud-init ● cloud-init.service - Initial cloud-init job (metadata service crawler) Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2024-05-22 15:52:27 UTC; 3min 58s ago Main PID: 433 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4618) Memory: 0B CGroup: /system.slice/cloud-init.service May 22 15:52:27 ip-IP-MASKED cloud-init[437]: | . . +| May 22 15:52:27 ip-IP-MASKED cloud-init[437]: | . .So.. o+o| May 22 15:52:27 ip-IP-MASKED cloud-init[437]: | + o+..o o+o| May 22 15:52:27 ip-IP-MASKED cloud-init[437]: | o oB.+o o+=.| May 22 15:52:27 ip-IP-MASKED cloud-init[437]: | =ooX*..oo+=| May 22 15:52:27 ip-IP-MASKED cloud-init[437]: | =@O. oo.=| May 22 15:52:27 ip-IP-MASKED cloud-init[437]: +----[SHA256]-----+ May 22 15:52:27 ip-IP-MASKED systemd[1]: Finished Initial cloud-init job (metadata service crawler). May 22 15:52:30 ip-IP-MASKED systemd[1]: /lib/systemd/system/cloud-init.service:19: Unknown key name 'ConditionEnvironment' in section 'Unit', ignoring. May 22 15:52:32 ip-IP-MASKED systemd[1]: /lib/systemd/system/cloud-init.service:19: Unknown key name 'ConditionEnvironment' in section 'Unit', ignoring. root@ip-IP-MASKED:~# apt install python3.9 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libpython3.9-minimal libpython3.9-stdlib python3.9-minimal Suggested packages: python3.9-venv python3.9-doc binutils binfmt-support The following NEW packages will be installed: libpython3.9-minimal libpython3.9-stdlib python3.9 python3.9-minimal 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 4979 kB of archives. After this operation, 19.9 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython3.9-minimal amd64 3.9.5-3ubuntu0~20.04.1 [756 kB] Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 python3.9-minimal amd64 3.9.5-3ubuntu0~20.04.1 [2022 kB] Get:3 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 libpython3.9-stdlib amd64 3.9.5-3ubuntu0~20.04.1 [1778 kB] Get:4 http://us-east-1.ec2.archive.ubuntu.com/ubuntu focal-updates/universe amd64 python3.9 amd64 3.9.5-3ubuntu0~20.04.1 [423 kB] Fetched 4979 kB in 0s (19.3 MB/s) Selecting previously unselected package libpython3.9-minimal:amd64. (Reading database ... 62035 files and directories currently installed.) Preparing to unpack .../libpython3.9-minimal_3.9.5-3ubuntu0~20.04.1_amd64.deb ... Unpacking libpython3.9-minimal:amd64 (3.9.5-3ubuntu0~20.04.1) ... Selecting previously unselected package python3.9-minimal. Preparing to unpack .../python3.9-minimal_3.9.5-3ubuntu0~20.04.1_amd64.deb ... Unpacking python3.9-minimal (3.9.5-3ubuntu0~20.04.1) ... Selecting previously unselected package libpython3.9-stdlib:amd64. Preparing to unpack .../libpython3.9-stdlib_3.9.5-3ubuntu0~20.04.1_amd64.deb ... Unpacking libpython3.9-stdlib:amd64 (3.9.5-3ubuntu0~20.04.1) ... Selecting previously unselected package python3.9. Preparing to unpack .../python3.9_3.9.5-3ubuntu0~20.04.1_amd64.deb ... Unpacking python3.9 (3.9.5-3ubuntu0~20.04.1) ... Setting up libpython3.9-minimal:amd64 (3.9.5-3ubuntu0~20.04.1) ... Setting up python3.9-minimal (3.9.5-3ubuntu0~20.04.1) ... Setting up libpython3.9-stdlib:amd64 (3.9.5-3ubuntu0~20.04.1) ... Setting up python3.9 (3.9.5-3ubuntu0~20.04.1) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for mime-support (3.64ubuntu1) ... root@ip-IP-MASKED:~# systemctl restart cloud-init root@ip-IP-MASKED:~# systemctl status cloud-init ● cloud-init.service - Initial cloud-init job (metadata service crawler) Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2024-05-22 15:57:01 UTC; 3s ago Process: 2021 ExecStart=/usr/bin/cloud-init init (code=exited, status=0/SUCCESS) Main PID: 2021 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4618) Memory: 156.0K CGroup: /system.slice/cloud-init.service May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | Route | Destination | Gateway | Interface | Flags | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | 1 | fe80::/64 | :: | ens5 | U | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | 3 | local | :: | ens5 | U | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | 4 | multicast | :: | ens5 | U | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: 2024-05-22 15:57:00,790 - handlers[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'sudo snap install amazon'...' May 22 15:57:01 ip-IP-MASKED systemd[1]: Finished Initial cloud-init job (metadata service crawler). root@ip-IP-MASKED:~# apt install python3.9-distutils Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'python3-distutils' instead of 'python3.9-distutils' python3-distutils is already the newest version (3.8.10-0ubuntu1~20.04). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@ip-IP-MASKED:~# systemctl status cloud-init ● cloud-init.service - Initial cloud-init job (metadata service crawler) Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2024-05-22 15:57:01 UTC; 58s ago Process: 2021 ExecStart=/usr/bin/cloud-init init (code=exited, status=0/SUCCESS) Main PID: 2021 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4618) Memory: 156.0K CGroup: /system.slice/cloud-init.service May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | Route | Destination | Gateway | Interface | Flags | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | 1 | fe80::/64 | :: | ens5 | U | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | 3 | local | :: | ens5 | U | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: | 4 | multicast | :: | ens5 | U | May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:57:00 ip-IP-MASKED cloud-init[2025]: 2024-05-22 15:57:00,790 - handlers[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'sudo snap install amazon'...' May 22 15:57:01 ip-IP-MASKED systemd[1]: Finished Initial cloud-init job (metadata service crawler). root@ip-IP-MASKED:~# systemctl restart cloud-init root@ip-IP-MASKED:~# update-alternatives --install /usr/bin/python python /usr/bin/python3.9 10 update-alternatives: using /usr/bin/python3.9 to provide /usr/bin/python (python) in auto mode root@ip-IP-MASKED:~# systemctl restart cloud-init root@ip-IP-MASKED:~# systemctl status cloud-init ● cloud-init.service - Initial cloud-init job (metadata service crawler) Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2024-05-22 15:58:36 UTC; 4s ago Process: 2124 ExecStart=/usr/bin/cloud-init init (code=exited, status=0/SUCCESS) Main PID: 2124 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4618) Memory: 136.0K CGroup: /system.slice/cloud-init.service May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: | Route | Destination | Gateway | Interface | Flags | May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: | 1 | fe80::/64 | :: | ens5 | U | May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: | 3 | local | :: | ens5 | U | May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: | 4 | multicast | :: | ens5 | U | May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:58:35 ip-IP-MASKED cloud-init[2128]: 2024-05-22 15:58:35,859 - handlers[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'sudo snap install amazon'...' May 22 15:58:36 ip-IP-MASKED systemd[1]: Finished Initial cloud-init job (metadata service crawler). root@ip-IP-MASKED:~# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2574k 100 2574k 0 0 41.2M 0 --:--:-- --:--:-- --:--:-- 41.8M root@ip-IP-MASKED:~# python get-pip.py Collecting pip Downloading pip-24.0-py3-none-any.whl.metadata (3.6 kB) Collecting wheel Downloading wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB) Downloading pip-24.0-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 16.7 MB/s eta 0:00:00 Downloading wheel-0.43.0-py3-none-any.whl (65 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 kB 1.1 MB/s eta 0:00:00 Installing collected packages: wheel, pip Successfully installed pip-24.0 wheel-0.43.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv root@ip-IP-MASKED:~# systemctl restart cloud-init root@ip-IP-MASKED:~# systemctl status cloud-init ● cloud-init.service - Initial cloud-init job (metadata service crawler) Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2024-05-22 15:59:17 UTC; 3s ago Process: 2169 ExecStart=/usr/bin/cloud-init init (code=exited, status=0/SUCCESS) Main PID: 2169 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4618) Memory: 144.0K CGroup: /system.slice/cloud-init.service May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | Route | Destination | Gateway | Interface | Flags | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | 1 | fe80::/64 | :: | ens5 | U | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | 3 | local | :: | ens5 | U | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | 4 | multicast | :: | ens5 | U | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: 2024-05-22 15:59:16,924 - handlers[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'sudo snap install amazon'...' May 22 15:59:17 ip-IP-MASKED systemd[1]: Finished Initial cloud-init job (metadata service crawler). root@ip-IP-MASKED:~# systemctl status cloud-init ● cloud-init.service - Initial cloud-init job (metadata service crawler) Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled) Active: active (exited) since Wed 2024-05-22 15:59:17 UTC; 23s ago Process: 2169 ExecStart=/usr/bin/cloud-init init (code=exited, status=0/SUCCESS) Main PID: 2169 (code=exited, status=0/SUCCESS) Tasks: 0 (limit: 4618) Memory: 144.0K CGroup: /system.slice/cloud-init.service May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | Route | Destination | Gateway | Interface | Flags | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | 1 | fe80::/64 | :: | ens5 | U | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | 3 | local | :: | ens5 | U | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: | 4 | multicast | :: | ens5 | U | May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: ci-info: +-------+-------------+---------+-----------+-------+ May 22 15:59:16 ip-IP-MASKED cloud-init[2173]: 2024-05-22 15:59:16,924 - handlers[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'b'sudo snap install amazon'...' May 22 15:59:17 ip-IP-MASKED systemd[1]: Finished Initial cloud-init job (metadata service crawler). I still have access to the old AMI, so I am going to validate there. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2066066 Title: cloud-init startup failure with Python 3.9.5, Ubuntu Focal To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2066066/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs