Migrating from RP 3 to Raspberry 4 : python errors

Hi, I migrating from RP3 to RP4. Backup RP3, installed RP4 with image on SSD and did a restore. That restored installation creates all kind of problems predominantly with Python. See example error below.
I would like to just have a new installation but don’t want to re-integrate the 60+ devices again. Is there anyway to do an installation from scratch and then import all the devices and maybe the automations?
Should I copy the YAML file on the old one maybe and past it on the RP4?
Any other tips, maybe how to fix the python issues?

Thanks.

"Unable to install package PyBluez==0.22: error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [19 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-cpython-311 creating build/lib.linux-aarch64-cpython-311/bluetooth copying bluetooth/init.py → build/lib.linux-aarch64-cpython-311/bluetooth copying bluetooth/widcomm.py → build/lib.linux-aarch64-cpython-311/bluetooth copying bluetooth/osx.py → build/lib.linux-aarch64-cpython-311/bluetooth copying bluetooth/msbt.py → build/lib.linux-aarch64-cpython-311/bluetooth copying bluetooth/btcommon.py → build/lib.linux-aarch64-cpython-311/bluetooth copying bluetooth/bluez.py → build/lib.linux-aarch64-cpython-311/bluetooth copying bluetooth/ble.py → build/lib.linux-aarch64-cpython-311/bluetooth running build_ext building ‘bluetooth._bluetooth’ extension creating build/temp.linux-aarch64-cpython-311 creating build/temp.linux-aarch64-cpython-311/bluez gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I./port3 -I/usr/local/include/python3.11 -c bluez/btmodule.c -o build/temp.linux-aarch64-cpython-311/bluez/btmodule.o error: command ‘gcc’ failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for PyBluez ERROR: Could not build wheels for PyBluez, which is required to install pyproject.toml-based projects [notice] A new release of pip is available: 23.2.1 → 23.3.1 [notice] To update, run: pip install --upgrade pip
22:24:21 – (ERROR) util/package.py -