Chocolatey Software | Python 3.7.8

choco upgrade python -y --source="'INTERNAL REPO URL'" --version="'3.7.8'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade python -y --source="'INTERNAL REPO URL'" --version="'3.7.8'" $exitCode = $LASTEXITCODE Write-Verbose "Exit code was $exitCode" $validExitCodes = @(0, 1605, 1614, 1641, 3010) if ($validExitCodes -contains $exitCode) { Exit 0 } Exit $exitCode

Từ khóa » Cài đặt Python 3.7.8