Create python3 symlink on Windows

This commit is contained in:
Vladimir Safonkin 2021-01-21 11:02:09 +03:00
parent 918fe6dc0f
commit de3f713ccc

View File

@ -121,6 +121,11 @@ if ($LASTEXITCODE -ne 0) {
Throw "Error happened during Python installation"
}
Write-Host "Create `python3` symlink"
if ($MajorVersion -ne "2") {
New-Item -Path "$PythonArchPath\python3.exe" -ItemType SymbolicLink -Value "$PythonArchPath\python.exe"
}
Write-Host "Install and upgrade Pip"
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location"