launchSitl "can't find '__main__' in module in ' ' error

I don’t follow regarding the board as I see there are options https://ardupilot.org/plane/docs/common-holybro-kakuteh7.html. How are you connecting to the companion? Note the video series with this boad (https://www.youtube.com/watch?v=XO7gGvhSqO0&list=PL_O9QDs-WAVyozF4JOVFkxVpv-cKs6-DN&index=1)

Regarding the SITL, I just verified the following steps work (some optional). It is based on this forum link which I slightly modified and deviates a bit from the course. The link further discusses using launchSitl.

https://community.dojofordrones.com/t/ubuntu-20-python3-setup/304/26.

Create VBox Ubuntu 20.04 machine (minimal install)

sudo apt update && sudo apt upgrade -y

sudo apt install build-essential manpages-dev git -y

sudo apt-get install python3-dev python3-pip -y

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
NOTE: ‘–’ two dashes for ‘install’

sudo apt-get install python3-opencv python3-wxgtk4.0 -y

sudo apt install python3-matplotlib python3-lxml -y

sudo apt install python3-serial python3-scipy python3-pexpect python3-tk -y

python3 -m pip install -U pygame –user
NOTE: ‘–’ two dashes for ‘user’

pip3 install PyYAML mavproxy

echo “export PATH=$PATH:$HOME/.local/bin” >> ~/.bashrc

source ~/.bashrc

sudo usermod -a -G dialout $USER

sudo apt remove modemmanager -y

cd ~

mkdir drone

sudo echo “export drone= /home/$USER/drone” >> ~/.bashrc

source ~/.bashrc

cd drone

mkdir apm

cd apm

git clone -b Copter-4.1.1 https://github.com/ardupilot/ardupilot
NOTE: Check for latest version.

cd ardupilot

git submodule update –init –recursive
NOTE": ‘–’ two dashes for ‘init’ and ‘recursive’

cd

sudo -H pip3 install dronekit==2.9.2

sudo -H pip3 install dronekit-sitl==3.3.0

Example simple run (using two dashes)
cd /drone/apm/ardupilot/ArduCopter
…/Tools/autotest/sim_vehicle.py --console --map

Example run with Mission Planner outside of VBox
sim_vehicle.py --console –-out x.x.x.x:14551
NOTE: x.x.x.x is your local computer with pre-installed MP

I can run without a virtual environment, but conflicts are possible.