Thanks for the reply
I think the issue is the python version should be upper than 3.8
However, the latest python version for ubuntu 18.04 is python 3.6
Thus, I am thinking whether I should use git checkout to change the release version of the PX4-Autopilot
However, I am not sure which release version of the PX4-Autopilot is suitable for ubuntu 18.04
Most people only change python version by the
$update-alternatives --config python
However, it only changes the python version, instead of python3 version
After that , you can start run installation command
$bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
However, there will be an new error
["ModuleNotFoundError: No module named 'apt_pkg'" appears in various commands](https://unix.stackexchange.com/questions/588066/modulenotfounderror-no-module-named-apt-pkg-appears-in-various-commands)
Finally I successfully solve this issue and can install the
bash ./PX4-Autopilot/Tools/setup/ubuntu.sh
By the way, after this, I reboot but cannot login,
I guess the reason is the authority of some directory is changed by the upper commands
So I cannot login my ubuntu 18.04 even with correct password.
Finally, I solve this issue by the following commands to reinstall the ubuntu-desktop without losing any file and data.
Glad you got it figured out. Apologies for not adding more detail, I should have mentioned setting up a virtual environment so it doesn’t effect the rest of your os.
Here’s a stack overflow question with some good info for anyone else reading this