{"id":8438,"date":"2023-09-28T14:15:58","date_gmt":"2023-09-28T21:15:58","guid":{"rendered":"https:\/\/visualgdb.com\/w\/?p=8438"},"modified":"2024-10-20T17:12:23","modified_gmt":"2024-10-21T00:12:23","slug":"managing-python-installations","status":"publish","type":"post","link":"https:\/\/visualgdb.com\/documentation\/python\/","title":{"rendered":"Managing Python Installations"},"content":{"rendered":"<p>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 <strong>Tools-&gt;Options-&gt;VisualGDB-&gt;General-&gt;Python Directory<\/strong>.<\/p>\n<p>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:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2023\/09\/python.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8439\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2023\/09\/python.png\" alt=\"\" width=\"744\" height=\"602\" \/><\/a><\/p>\n<p>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 <strong>%LOCALAPPDATA%\\VisualGDB\\Python*<\/strong> and will select a compatible one for each project type based on the <strong>FrameworkCompatibility<\/strong> element in <strong>&lt;Python directory&gt;\\package.xml<\/strong>:<\/p>\n<pre class=\"\">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;InstalledAuxiliaryPackageSummary xmlns:xsd=\"http:\/\/www.w3.org\/2001\/XMLSchema\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"&gt;\r\n  &lt;PackageID&gt;python&lt;\/PackageID&gt;\r\n  &lt;PackageVersion&gt;3.8.10&lt;\/PackageVersion&gt;\r\n  &lt;PackageDescription&gt;Python&lt;\/PackageDescription&gt;\r\n  &lt;FrameworkCompatibility&gt;mbed=*;NRFConnect=0-2.4;PicoSDK=*;ESPIDF=*;ESPADF=*;ESP8266RTOS=*&lt;\/FrameworkCompatibility&gt;\r\n&lt;\/InstalledAuxiliaryPackageSummary&gt;<\/pre>\n<h2>Installing and Uninstalling Python Packages Manually<\/h2>\n<p>You can manage the Python installations managed by VisualGDB via <strong>Tools-&gt;VisualGDB-&gt;Manage VisualGDB Packages-&gt;Auxiliary Tools:<a href=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2023\/09\/pythonver.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8442\" src=\"https:\/\/visualgdb.com\/w\/wp-content\/uploads\/2023\/09\/pythonver.png\" alt=\"\" width=\"885\" height=\"498\" \/><\/a><\/strong><\/p>\n<p>If you would like to install older Python version via this window, make sure you check the &#8220;show old packages&#8221; checkbox.<\/p>\n<h2>Troubleshooting Python issues<\/h2>\n<p>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:<\/p>\n<ol>\n<li>Delete the <strong>%LOCALAPPDATA%\\VisualGDB\\Python*<\/strong> directories.<\/li>\n<li>Clear the Python paths via <strong>Tools-&gt;Options-&gt;VisualGDB-&gt;General-&gt;Python Directory<\/strong>.<\/li>\n<li>Restart Visual Studio.<\/li>\n<li>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.<\/li>\n<\/ol>\n<p>You can also view the package <a href=\"https:\/\/visualgdb.com\/documentation\/troubleshooting\/packagelog\/\">installation log<\/a> to see if any of other packages were recently updated, and revert the updates.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many project types (e.g. ESP-IDF, NRFConnect) require a Python installation with specific packages in order to build the projects. VisualGDB<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[199],"tags":[],"_links":{"self":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/8438"}],"collection":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/comments?post=8438"}],"version-history":[{"count":4,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/8438\/revisions"}],"predecessor-version":[{"id":8893,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/posts\/8438\/revisions\/8893"}],"wp:attachment":[{"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/media?parent=8438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/categories?post=8438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/visualgdb.com\/w\/wp-json\/wp\/v2\/tags?post=8438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}