Removing python34 from PIO path

Just wondering if anybody has pointers how to purge a dead reference to c:\Python34 from the PIO $Env:path

In my PIO Terminal Windows PowerShell,
C:\Users\neilh77.platformio\penv\Scripts;C:\Users\neilh77.platformio\penv;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python37\Scripts;C:\Python37;C:\Python34;C:\Python34\Scripts;C:\ProgramData\Oracle\Java\javapath;…

when I invoke PowerShell externally I don’t have Python34 in the path

PS C:\Users\neilh77> $env:path
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Python37\Scripts;C:\Python37;C:\ProgramData\Oracle\Java\javapath; …

Any chance you have a custom path set in the VSCode Platformio preferences? (i.e. Goto the extensions pane, right click on the PlatformIO entry, choose ‘Configure Extension Settings’ and then look for the custom path setting. Alternately, go File -> Preferences -> Settings and have a look under Extensions -> PlatformIO to get to the same area).

Gosh really appreciate the detailed step navigation - very useful.
No it doesn’t look like it. I haven’t edited anything on PIO internals (mostly because I haven’t needed to customize it further :smile: )
Here is the snapshot of what appears to be set

No problem… picture speaks a thousand words, etc :wink:

Hm… perhaps an @ivankravets question… where else would the PlatformIO Terminal would be getting that path from in VSCode?

The current VSCode API does not allow to do this. We can create a new terminal with patched os.environ.PATH, but we can’t propagate updated PATH to already existing terminals opened via VSCode.

So, just use “terminal” icon on the bottom toolbar (this is our terminal with patched PATH) or left side bar PlatformIO > Open PlatformIO Core CLI.

1 Like

I don’t think we’re talking about updating the path of terminals currently running… but the path given to a new terminal… please correct me if I’m wrong there @neilh20

So how’s the path constructed… I take it the system PATH is the basis, with the PIO paths prepended? I assume platformio-ide.updateTerminalPathConfiguration need to be enabled for that to happen?

It seems that an invalid C:\Python34;C:\Python34\Scripts is included partway through the path list in PIO Powershell terminal instance, but not in a system run powershell terminal instance.

Ah, I see.

  1. Please check system environment variables settings
  2. Remove .vscode folder from a project.

Restart VSCode.

1 Like

Correct - its the new terminal created in VSC.
In .vscode\settings.json “”: {
I found references to Python34,

On deleting .vscode and starting VSC it was removed from VSC $Env:Path

It may be related, but I initially installed VSC “System Installer” with admin
and then 2nd time around with these issues, I removed VSC and on new install it was “User Intstall” in user space.
Many thanks for the pointers. Amazing IDE. :slight_smile: