Install after upgrading to python3.10 Hass problems

I was running HA core on an OdroidN2+ running ubuntu 20, I foolishly upgraded the OS to ubuntu 22, and found , HA no longer was able to communicated with some , but not all of the devices.
Problem is around MQTT, I’m sure as IOT4 devices would not connect, some Shelly devices were unavailable . The original install of 2022.5.4 used python 3.9. I tried an upgrade and saw a lot of python errors. Strangely in dev tools I could see the Shelly EM power meter readings , but lovelace was marking it as unavailable.
As there was a newer version I reinstalled, all went OK until I ran hass, and then

(homeassistant) odroid@odroid:/srv/homeassistant$ hass
2022-08-30 12:18:51.486 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
  File "/srv/homeassistant/bin/hass", line 8, in <module>
    sys.exit(main())
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/__main__.py", line 191, in main
    exit_code = runner.run(runtime_conf)
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/runner.py", line 119, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/runner.py", line 101, in setup_and_run_hass
    hass = await bootstrap.async_setup_hass(runtime_config)
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/bootstrap.py", line 143, in async_setup_hass
    await async_from_config_dict(config_dict, hass) is not None
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/bootstrap.py", line 256, in async_from_config_dict
    await _async_set_up_integrations(hass, config)
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/bootstrap.py", line 532, in _async_set_up_integrations
    recorder.async_initialize_recorder(hass)
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/helpers/recorder.py", line 22, in async_initialize_recorder
    from homeassistant.components.recorder import const, models
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/recorder/__init__.py", line 23, in <module>
    from . import statistics, websocket_api
  File "/srv/homeassistant/lib/python3.10/site-packages/homeassistant/components/recorder/statistics.py", line 17, in <module>
    from sqlalchemy import bindparam, func, lambda_stmt, select
ModuleNotFoundError: No module named 'sqlalchemy'
type or paste code here

Does HA function with python3.10 if so is there a workaround , I got the same when I tried to upgrade.
If not back to ubuntu 20, I have other applications on that device so the odroid HA image is no preferred.
help appreciated please.

Last time I looked Python 3.10 is newer than Python3.9, Now flashing the OS to go back to Ubuntu20.04 which has Pyton3.9. It was an upgrade from ubuntu 20 to ubuntu 22 which upgrade every package, so there was a complete install of python including the dev libs. close the topic now.
thanks for the reply

Why not just install sqlalchemy, looks like that’s missing. When I upgraded my core install to 3.10 I had to manually install several python packages.

Thanks PrairieSnpr, is it just sqlalchemy causing the errors ?? if so I’ll have another attempt , the ubuntu 20 route is painful as its mix of Py3.8 and 3.9, and an install of HA loads a 2021 version, which then has to be upgraded. Card reflashed , I try U21 again, and see if a clean install of HA produces less errors.
I wish my knowledge of python was better

The one you posted, yes that’s caused by not having sqlalchemy. I would run hass --script check_config and then install any packages it complains about until it runs without errors. In this case pip3 install sqlalchemy should get past this one.

many thanks , just in the process of doing an upgrade from U20 to U21, as hardkernel haven’t put any images on the servers yet