Skip to content

Visual Studio Code Raspberry Pi Pico Extension fails to download SDK, claims Python3 is not installed and in path, except that it is. #156

Closed
@glenbarney

Description

@glenbarney

Describe the bug
Visual Studio Code Raspberry Pi Pico Extension fails to download SDK, claiming incorrectly that Python3 is not installed or in the Path.

On a clean, brand new deployment of Visual Studio Code (with all profiles wiped and all extensions removed), on a computer with Windows 11 Pro and Python 3.13.1 correctly installed and fully functional, the Raspberry Pi Pico extension fails to download the SDK. Error messages seen are:

Failed to download and install SDK. Make sure all requirements are met.
Python3 is not installed and in path

Extension Logs
[Extension Host] do not activate
console.ts:137 [Extension Host] [INFO] [raspberry-pi-pico - extension] Extension activation triggered
console.ts:137 [Extension Host] [INFO] [raspberry-pi-pico - UI] Initializing UI
console.ts:137 [Extension Host] [WARN] [raspberry-pi-pico - extension] No workspace folder or Pico project found.
index.html:283 No service worker controller found. Waiting for controllerchange.
console.ts:137 [Extension Host] [INFO] [raspberry-pi-pico - examplesUtil] Successfully downloaded examples list from the internet.
console.ts:137 [Extension Host] [INFO] [raspberry-pi-pico - NewProjectPanel] Loaded 118 examples.
tailwindcss-3_3_5.js:62 cdn.tailwindcss.com should not be used in production. To use Tailwind CSS in production, install it as a PostCSS plugin or use the Tailwind CLI: https://tailwindcss.com/docs/installation
main.js:391 [raspberry-pi-pico] Set theme mode to: dark
console.ts:137 [Extension Host] [raspberry-pi-pico] https://github.com/raspberrypi/pico-examples.git sdk-2.1.0 has been cloned with a sparse-checkout.
console.ts:137 [Extension Host] [raspberry-pi-pico] Sparse-checkout selected example: blink
console.ts:137 [Extension Host] [raspberry-pi-pico] Copying example from C:/Users/Glen/.pico-sdk/examples/blink to c:/Users/Glen/Desktop
console.ts:137 [Extension Host] [raspberry-pi-pico] Done copying example.
console.ts:137 [Extension Host]%
{}
console.ts:137 [Extension Host] [raspberry-pi-pico] https://github.com/raspberrypi/pico-sdk.git 2.1.0 has been cloned and installed.
log.ts:445 ERR [Extension Host] [�[31mERROR�[0m] [raspberry-pi-pico - download] Python3 is not installed and could not be downloaded.
console.ts:137 [Extension Host] [ERROR] [raspberry-pi-pico - download] Python3 is not installed and could not be downloaded.
notificationsAlerts.ts:42 Python3 is not installed and in PATH.
log.ts:445 ERR [Extension Host] [�[31mERROR�[0m] [raspberry-pi-pico - NewProjectPanel] Failed to download and install SDK.
console.ts:137 [Extension Host] [ERROR] [raspberry-pi-pico - NewProjectPanel] Failed to download and install SDK.
notificationsAlerts.ts:42 Failed to download and install SDK. Make sure all requirements are met.

To Reproduce
1, Windows 11 Pro, all updates applied
2. Latest Version of Python (3.13.1) installed from Store, confirmed working
3. Fresh install of Visual Studio Code (when repeating, removed all extensions and profiles first)
4. Install Raspberry Pi Pico extension.
5. Click on extension Icon
6. "New Project From Example"
7. Example: Blink
8. Board type: Pico W
9. Location: Desktop
10. Click Create Button
11. Observe error messages in lower right corner of screen:

Failed to download and install SDK. Make sure all requirements are met.
Python3 is not installed and in path

Image

Expected behavior
Per Raspberry Pi Getting Started Guide ( https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf ) , exepected behavior is "The extension will now download the SDK and the toolchain, install them locally, and generate the new project. "

Screenshots
Screenshot Attached.

Image

Platform (please complete the following information):

  • OS: Windows 11 Pro,
  • Architecture: X86_64
  • Python 3.13.1
  • Visual Studio Code 1.96.4 (User)
  • Extension: raspberry-pi.raspberry-pi-pico Version 0.17.2 Published 2024-03-27, 09:58:08 Last Released 2024-11-25, 03:58:18

Additional context

  1. Python is in fact installed and working
  2. Visual Studio code can build and run regular python files and projects
  3. In Settings, Raspberry Pi Pico Python 3 path IS set (was set automatically) and is correct: c:\Users\Glen\AppData\Local\Microsoft\WindowsApps\python3.13.exe
  4. That file does exist:

C:\Users\Glen\AppData\Local\Microsoft\WindowsApps>python3.13
Python 3.13.1 (tags/v3.13.1:0671451, Dec 3 2024, 19:06:28) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

  1. If I create a folder "test" and a one-line "hello.py" file in that folder in Visual Studio Code, an attempt to "Run Without Debugging" succeeds:

PS C:\Users\Glen\Desktop\test> c:; cd 'c:\Users\Glen\Desktop\test'; & 'c:\Users\Glen\AppData\Local\Microsoft\WindowsApps\python3.13.exe' 'c:\Users\Glen.vscode\extensions\ms-python.debugpy-2024.14.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher' '55830' '--' 'c:\Users\Glen\Desktop\test\hello.py'
Hello world!

A manual run from the same Terminal window also works:

PS C:\Users\Glen\Desktop\test> python hello.py
Hello world!

PS C:\Users\Glen\Desktop\test> python3.13 hello.py
Hello world!

  1. Others are complaining about similar issues:
    https://forums.raspberrypi.com/viewtopic.php?t=376050
    https://forums.raspberrypi.com/viewtopic.php?t=376007

  2. It has been suggested that changing the Python Locator from "native" back to "js" might help. It does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions