Skip to content

Instantly share code, notes, and snippets.

@Bak-Jin-Hyeong
Created August 10, 2018 12:12
Show Gist options
  • Save Bak-Jin-Hyeong/70f121b50d3c0529249b64752db14035 to your computer and use it in GitHub Desktop.
Save Bak-Jin-Hyeong/70f121b50d3c0529249b64752db14035 to your computer and use it in GitHub Desktop.
Add the path of the Python interpreter to the Windows PATH environment variable.
$PythonPath = Resolve-Path '~\AppData\Local\Programs\Python\Python36'
$ScriptsPath = Join-Path $PythonPath 'Scripts'
if ($env:Path.Split(';') | Select-String -Pattern $PythonPath -SimpleMatch)
{
exit 0
}
$env:Path += ';' + $PythonPath
$env:Path += ';' + $ScriptsPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment