Contenuto principale

Install Python 3.8.2 on Windows for Firmware Upload

R2026b

To flash PX4® firmware onto an autopilot board, the UAV Toolbox Support Package for PX4 Autopilots uses Python® 3.8.2 and pySerial 3.4. If these are not already installed on your Windows® computer, the hardware setup wizard guides you through the installation process.

Note

You need an Internet connection to install Python 3.8.2 on your Windows computer.

To install Python 3.8.2 from hardware setup, follow these steps.

  1. After installing the UAV Toolbox Support Package for PX4 Autopilots, start the hardware setup by opening the Add-On Manager.

    Add-On Manager window showing installed support packages

  2. In the Add-On Manager, start the hardware setup process by clicking the Setup button Setup button.

    The following page appears if you are setting up hardware for PX4 for the first time in the current installation of MATLAB®.

    Hardware setup page prompting to install or locate Python 3.8.2

If Python 3.8.2 Is Already Installed

If Python 3.8.2 is already installed on your computer, select I have already installed Python 3.8.2 and click Next. The next hardware setup requires a valid path where you have Python 3.8.2 installed.

Hardware setup page for specifying the Python installation path

After you provide the path where Python 3.8.2 is installed, click Validate. After successful validation, you can move to the next hardware setup pages.

Hardware setup page showing successful Python path validation

If validation fails, reinstall Python 3.8.2. For more information, see If Python 3.8.2 Is Not Installed.

If Python 3.8.2 Is Not Installed

If Python 3.8.2 is not installed on the computer, select Automatically Download and Install and click Next.

Note

The firmware upload requires Python 3.8.x (any patch version). If you already have a 3.8.x version installed (for example, 3.8.1 or 3.8.3), see If Python 3.8.2 Is Already Installed instead. Other Python 3 versions with a different minor version (such as 3.9.x, 3.10.x, or 3.7.x) are not compatible and require you to install 3.8.2.

The automatic installation fails if a 3.8.x version is already present. In that case, see If Python 3.8.2 Is Already Installed to point to the existing installation.

After clicking Next, the following page appears.

Hardware setup page for automatic Python download and installation

Specify the path where you want to install Python 3.8.2 in your computer and click Install. Python 3.8.2 and pySerial 3.4 are installed at that path. After successful installation, click Next to continue to the next pages.

See Also

Topics