Unable to create a build configuration in VS Code using nRF Connect Extension

Hi, 

I followed the instructions listed in Installing the nRF Connect SDK (nordicsemi.com). Then I followed the steps in How to create and build an application (nordicsemi.com) but I keep getting the error shown in the attachment when trying to build the application. I am stuck at the 'Add Build Configuration' step with the error attached. ("Could NOT find Python3"). Could someone please help me figure out what I am missing?

When I hit 'Build Configuration' the nRFConnect Terminal just sits there spinning with no output or error. Then, I tried to use 'west build' command and that's when I see the error attached. 

Using toolchain v2.7.0

SDK v2.7.0

  • Hi Andreas,

    Thank you for your response. 

    1. I have attached the general support information. 

    IMPORTANT: The data below could contain sensitive or confidential information about your environment.
    If you do not wish this to be seen by others, please make sure to remove it before sharing.
    
    For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "win32",
        "osVersion": "Windows 10 Enterprise",
        "osKernel": "10.0.19045",
        "vscode": "1.94.2",
        "electron": "30.5.1",
        "node": "v20.16.0"
      },
      "system": {
        "date": "2024-10-14T13:22:15.798Z",
        "vscodeRoot": "c:\\Program Files\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": false,
        "vscodeUptime": "64:41:24",
        "osUptime": "115:09:31",
        "cpu": "11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz"
      },
      "workspace": {
        "name": "blinky_pwm_1",
        "workspaceFile": null,
        "folders": [
          "c:\\nordic\\myapps\\blinky_pwm_1"
        ]
      },
      "sdks": [
        {
          "version": "v2.7.0",
          "path": "c:\\ncs\\v2.7.0"
        }
      ],
      "apps": [
        {
          "workspace": "c:\\nordic\\myapps\\blinky_pwm_1",
          "uri": "c:\\nordic\\myapps\\blinky_pwm_1",
          "buildConfigurations": []
        }
      ],
      "topdir": "c:\\ncs\\v2.7.0",
      "workspaceState": "freestanding-ready",
      "toolchains": [
        {
          "version": "2.7.0",
          "path": "c:\\ncs\\toolchains\\ce3b5ff664"
        }
      ],
      "activeToolchain": {
        "type": "installation",
        "path": "c:\\ncs\\toolchains\\ce3b5ff664",
        "version": "2.7.0",
        "displayName": "nRF Connect SDK Toolchain v2.7.0"
      },
      "connectedDevices": [
        {
          "serialNumber": "123456"
        }
      ],
      "deviceProvider": "nrfutil",
      "tools": {
        "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.16.5-1",
        "C:\\Program Files\\SEGGER\\JLink_V794e\\JLink.exe": "7.94e",
        "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.24.2",
        "C:\\ncs\\toolchains\\ce3b5ff664\\cmake": "3.21.0",
        "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\Scripts\\west.exe": "1.2.0",
        "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\python.exe": "3.9.13",
        "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\ninja.exe": "1.10.2",
        "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\gperf.exe": "3.1",
        "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\dtc.exe": "1.4.7",
        "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\gn.exe": "2172",
        "C:\\ncs\\toolchains\\ce3b5ff664\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
        "arm-gdbPath": "c:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe",
        "riscv-gdbPath": "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin\\riscv64-zephyr-elf-gdb.exe"
      },
      "nrfutil": {
        "nrfutil-device": {
          "version": "2.5.0",
          "binPath": "c:\\Users\\paulek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device"
        },
        "nrfutil-toolchain-manager": {
          "version": "0.14.4",
          "binPath": "c:\\Users\\paulek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64\\platform\\nrfutil\\bin\\nrfutil-toolchain-manager"
        }
      },
      "environment": {
        "westEnv": {
          "HOME": "C:\\Users\\paulek",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\paulek",
          "PATH": "C:\\ncs\\toolchains\\ce3b5ff664;C:\\ncs\\toolchains\\ce3b5ff664\\mingw64\\bin;C:\\ncs\\toolchains\\ce3b5ff664\\bin;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\Scripts;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\nanopb\\generator-bin;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk\\aarch64-zephyr-elf\\bin;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk\\x86_64-zephyr-elf\\bin;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin;c:\\Users\\paulek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64\\platform\\nrfutil\\lib\\nrfutil-toolchain-manager;C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\MATLAB\\R2022b\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files (x86)\\Plantronics\\Spokes3G\\;C;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Python\\Scripts\\;C:\\Python\\;C:\\ncs;C:\\Users\\paulek\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\paulek\\AppData\\Local\\gitkraken\\bin;C:\\Users\\paulek;C:\\Program Files (x86)\\Keil_v5\\ARM\\ARMCLANG\\bin;",
          "ZEPHYR_BASE": "c:\\ncs\\v2.7.0\\zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\zephyr-sdk",
          "PYTHONPATH": "C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\Lib;C:\\ncs\\toolchains\\ce3b5ff664\\opt\\bin\\Lib\\site-packages"
        },
        "inherited": {
          "HOME": "C:\\Users\\paulek",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\paulek",
          "Path": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\MATLAB\\R2022b\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files (x86)\\Plantronics\\Spokes3G\\;C;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Python\\Scripts\\;C:\\Python\\;C:\\ncs;C:\\Users\\paulek\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\paulek\\AppData\\Local\\gitkraken\\bin;C:\\Users\\paulek;C:\\Program Files (x86)\\Keil_v5\\ARM\\ARMCLANG\\bin;C:\\Program Files\\CMake\\bin;",
          "PATH": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\MATLAB\\R2022b\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files (x86)\\STMicroelectronics\\STM32 ST-LINK Utility\\ST-LINK Utility;C:\\Program Files (x86)\\Plantronics\\Spokes3G\\;C;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\CMake\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Microsoft VS Code\\bin;C:\\Python\\Scripts\\;C:\\Python\\;C:\\ncs;C:\\Users\\paulek\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\paulek\\AppData\\Local\\gitkraken\\bin;C:\\Users\\paulek;C:\\Program Files (x86)\\Keil_v5\\ARM\\ARMCLANG\\bin;C:\\Program Files\\CMake\\bin;",
          "PYTHONPATH": "C:\\Python;C:\\Python\\libs;C:\\Watlow\\projects;"
        }
      },
      "terminal": {
        "defaultProfile": "nRF Connect"
      },
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "",
          "toolchain": {
            "path": "c:\\ncs"
          },
          "ozonePath": "",
          "applications": [],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig",
            "executeInDefaultShell": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "taskBindings": {},
          "buildTerminal": {
            "condensedProgress": true
          },
          "debugging": {
            "flash": true,
            "bindings": {},
            "justMyCode": true
          },
          "activeAppFollowActiveEditor": true,
          "deviceProvider": "nrfutil",
          "flash": {
            "softreset": false,
            "erase": false,
            "recover": false
          },
          "enableTelemetry": false,
          "thirdpartyIntegration": {},
          "toolchainManager": {
            "indexURL": null,
            "installDirectory": null
          },
          "nrfutil": {
            "home": null
          },
          "defaultOpenAction": "ask",
          "welcome": {
            "showOnStartup": true
          }
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        }
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2024.9.87",
            "path": "c:\\Users\\paulek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2024.9.87-win32-x64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2024.9.14",
            "path": "c:\\Users\\paulek\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2024.9.14",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2024.9.26",
            "path": "c:\\Users\\paulek\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2024.9.26",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2024.9.20",
            "path": "c:\\Users\\paulek\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2024.9.20",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": null,
          "ms-vscode.cpptools": "1.21.6",
          "ms-vscode.js-debug": "1.94.0",
          "ms-vscode.js-debug-companion": "1.1.3",
          "ms-vscode.vscode-js-profile-table": "1.0.10",
          "ms-vscode.cmake-tools": "1.19.52",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      }
    }
    
    

    2. I will give this another try. 

    3. I don't have access to another machine. I would have to ask one of my colleagues to try this out which is currently not an option. 

    4. Windows 10. 

    5. The file I attached earlier is the CMakeCache.txt file found in the build folder, not exactly the build log. Maybe that's why it looks different. I apologize for attaching another screenshot but I don't know where this build log is located. This is what I see when I run the 'west build' command. 

    Lekha

  • Thank you for verifying 

    LPauly said:
    . The file I attached earlier is the CMakeCache.txt file found in the build folder, not exactly the build log. Maybe that's why it looks different. I apologize for attaching another screenshot but I don't know where this build log is located. This is what I see when I run the 'west build' command. 

    A quick thought: Is this command entered in a generic cmd or one opened through the toolchain? I.e 

    (Ignore the mismatched toolchain and SDK on my part, I have multiple instances opened at the moment). If it is a generic terminal and not a "Terminal Profile", could you try again by opening the Terminal profile?

    And if you do see the same issue that I saw when building with "west build --board nrf52832dk", could you try again with the correct target, i.e "west build --board nrf52dk_nrf5232". I assume it is a nRF52DK you're using (which has the nRF52832 SoC onboard)?

    Kind regards,
    Andreas

  • I opened the terminal from the toolchain and tried the command again with the same build errors as before. I also tried with the correct target with the same error - "Could NOT find Python3". I think reinstallation is the way to go. 

  • Thank you for confirming, keep me posted about the progress 

    Kind regards,
    Andreas

  • No luck.

    Uninstalled and reinstalled a few times over, deleting %appdata%\code, %userdata%\.vscode each time. But I still get the same error message. "CMake Error at... Could not find Python3 (missing : Interpreter)".

    1. I even tried an older version of VS code (1.92.0). I also tried to install a previous version of nrf command line tools (10.18.0). Still the same error. Should I be restarting my computer every time I reinstall?

    2. I am selecting the x64 version for each download since the system type(from System information) is x64 based PC. I assume this is correct. 

    3. Would you be able to share your "General Support Information". Maybe I can figure out what I am missing. 

Related