Installing Plone on Ubuntu using deadsnakesppa

I'm trying to use the universal installer to install plone on an ubuntu instance running on aws.
Brand new instance out of the box.

I've sudo apt updated and sudo apt upgraded.

The version of python (3.10.6) is not compatible

/usr/bin/python3 does not meet the requirements for Zope/Plone

So I followed the instructions to get python 3.8 which gets me python3.8.14 using the deadsnakes ppa apt repository.

./install.sh --with-python=/usr/bin/python3.8 gives rise to

Using useradd and groupadd to create users and groups.
plone_group already exists; no need to create it.
User plone_daemon already exists. No need to create it.
Adding user plone_daemon to group plone_group.
User plone_buildout already exists. No need to create it.
Adding user plone_buildout to group plone_group.
Creating Python virtual environment.
Installing Python requirements in virtual environment.
Unable to install Python requirements in virtual environment.

Installation has failed.
See the detailed installation log at /home/ubuntu/Plone-5.2.9-UnifiedInstaller-1.0/install.log
to determine the cause.
Detailed installation log
Starting at Tue Oct 11 14:04:12 UTC 2022
Creating Python virtual environment.
Error: Command '['/opt/plone/zeocluster/bin/python3.8', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
Virtualenv successfully created
Installing Python requirements in virtual environment.
sudo: /opt/plone/zeocluster/bin/pip: command not found
Unable to install Python requirements in virtual environment.

Does anyone have a guide for how to install Plone on Ubuntu when Python 3.10 is installed using Python 3.8 instead and getting it to work, because I haven't a clue what I've done wrong.

See the detailed installation log at /home/ubuntu/Plone-5.2.9-UnifiedInstaller-1.0/install.log

There you've more info on what went wrong.

Yeah. I included the contents of the log. pip hasn't been installed and I can't figure out why.
But it may be a linux problem, rather than a Plone problem and I may need to find someone in my facebook community of devs and nerds that knows how to install Python3.8 and pip for Python3.8 on Ubuntu, because if I try to install pip with apt, it installs Python3.10

Yeah. this was my lack of linux admin fu.
Thanks for your forebearance.

My advice is to use pyenv to manage python versions. Install it with:

Basically you can install any python version you want. Then you can switch between python versions using different strategies:

Because you're installing and then every command will be created with the right python, you can just switch python temporary (pyenv shell switch it in the current terminal/shell) and then install:

$ python
Python 2.7.16 (default, Oct 10 2019, 22:02:15) 
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ pyenv shell 3.8.8
$ python
Python 3.8.8 (default, Jun 10 2021, 12:11:40) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
<install Plone>

I eventually managed to muddle through it. I am just unused to being the person to get the OS working.