We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e845971 commit 9bf63bcCopy full SHA for 9bf63bc
scripts/install-python.ps1
@@ -0,0 +1,9 @@
1
+# Abort with non zero exit code on errors
2
+$ErrorActionPreference = "Stop"
3
+
4
+Write-Host("Getting latest Python3 version for {0} ..." -f $env:VERSION)
5
+& choco list python3 --exact --by-id-only --all | Select-String -Pattern "python3 $env:VERSION"
6
+$Version = $(choco list python3 --exact --by-id-only --all) | Select-String -Pattern "python3 $env:VERSION" | %{$_.ToString().split(" ")[1]} | sort | Select-Object -Last 1
7
8
+Write-Host("Installing Python3 {0} ..." -f $Version)
9
+& choco install python3 --no-progress -y --version "$Version"
0 commit comments