Merge pull request #78 from vsafonkin/v-vlsafo/windows-python3-symlink

Add symlink `python3`
This commit is contained in:
MaksimZhukov 2021-01-25 12:27:40 +03:00 committed by GitHub
commit 2c5eb53471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,11 @@ if ($LASTEXITCODE -ne 0) {
Throw "Error happened during Python installation" 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" Write-Host "Install and upgrade Pip"
$PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe" $PythonExePath = Join-Path -Path $PythonArchPath -ChildPath "python.exe"
cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location" cmd.exe /c "$PythonExePath -m ensurepip && $PythonExePath -m pip install --upgrade pip --no-warn-script-location"