Managing Python Installations

Many project types (e.g. ESP-IDF, NRFConnect) require a Python installation with specific packages in order to build the projects. VisualGDB allows managing these Python installations via Tools->Options->VisualGDB->General->Python Directory.

Starting from VisualGDB 6.0, you can select the individually select the Python versions for each project type that uses it, and a default version that will be used otherwise:

Normally, we suggest leaving the explicit Python paths empty and have VisualGDB automatically install and use the Python version compatible with each project type. This way, VisualGDB will automatically install the pre-built Python installations to %LOCALAPPDATA%\VisualGDB\Python* and will select a compatible one for each project type based on the FrameworkCompatibility element in <Python directory>\package.xml:

<?xml version="1.0"?>
<InstalledAuxiliaryPackageSummary xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <PackageID>python</PackageID>
  <PackageVersion>3.8.10</PackageVersion>
  <PackageDescription>Python</PackageDescription>
  <FrameworkCompatibility>mbed=*;NRFConnect=0-2.4;PicoSDK=*;ESPIDF=*;ESPADF=*;ESP8266RTOS=*</FrameworkCompatibility>
</InstalledAuxiliaryPackageSummary>

Installing and Uninstalling Python Packages Manually

You can manage the Python installations managed by VisualGDB via Tools->VisualGDB->Manage VisualGDB Packages->Auxiliary Tools:

If you would like to install older Python version via this window, make sure you check the “show old packages” checkbox.

Troubleshooting Python issues

If you starting encountering strange Python errors (e.g. missing/incompatible packages), follow the steps below to reset your environment to versions that were tested on our side:

  1. Delete the %LOCALAPPDATA%\VisualGDB\Python* directories.
  2. Clear the Python paths via Tools->Options->VisualGDB->General->Python Directory.
  3. Restart Visual Studio.
  4. Use the project wizard for your project type (e.g. ESP-IDF) to create a new project. This will automatically download a compatible Python version, and will setup the underlying tools.