0

I am using the Sync Settings extension to synchronize my user settings to a Gist and have multiple systems that synchronize from it. The problem that I have is that my systems do not have the same configuration, particularly my user profile is a different path.

I want to use an environment variable in the path to my Python interpreter that is installed in my user space.

Is there a way to do this also that would be cross-platform?

I want something like this:

"python.pythonPath": "${env:HOME}\\AppData\\Local\\Programs\\Python\\Python37-32\\python.exe"

Is that possible? I have seen that there are environment variables, but I haven't been able to find a list of what they are.

Dustin
  • 326
  • 1
  • 7
  • I relied on this with success: https://stackoverflow.com/questions/43313903/how-to-setup-visual-studio-code-to-find-python-3-interpreter-in-windows-10?rq=1 – Dustin May 07 '19 at 11:10

1 Answers1

0

I just relied on the Path environment variable to handle it like in this post: How to setup Visual Studio code to find Python 3 interpreter in Windows 10

"python.pythonPath": "python.exe"

Also, I use Shell Launcher, so I added an entry for Python, in addition to Windows PowerShell and PowerShell Core:

"shellLauncher.shells.windows": [
        {
            "shell": "c:\\Program Files\\PowerShell\\6\\pwsh.exe",
            "label": "PowerShell Core"
        },
        {
            "shell": "C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe",
            "label": "Windows PowerShell"
        },
        {
            "shell": "python.exe",
            "label": "Python 3.7"
        }
    ]
Dustin
  • 326
  • 1
  • 7