mirror of
https://github.com/actions/python-versions.git
synced 2025-12-14 06:26:45 +00:00
fix: always reinstall pip (#271)
* fix: always reinstall pip If the default pip version is also the latest one, then the `pip` executable will be missing as the default pip is installed only as `pip3`/`pip3.x`. In order to always provide a `pip` executable, always reinstall pip. * chore(ci): change default version to 3.12.3 Default to the latest stable version.
This commit is contained in:
@@ -71,7 +71,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJOR_MINOR pyt
|
||||
echo "Upgrading pip..."
|
||||
export PIP_ROOT_USER_ACTION=ignore
|
||||
./python -m ensurepip
|
||||
./python -m pip install --upgrade pip --disable-pip-version-check --no-warn-script-location
|
||||
./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location
|
||||
|
||||
echo "Install OpenSSL certificates"
|
||||
sh -e "${PYTHON_APPLICATION_PATH}/Install Certificates.command"
|
||||
|
||||
@@ -51,7 +51,7 @@ chmod +x ../python $PYTHON_MAJOR $PYTHON_MAJOR_DOT_MINOR $PYTHON_MAJORMINOR pyth
|
||||
echo "Upgrading pip..."
|
||||
export PIP_ROOT_USER_ACTION=ignore
|
||||
./python -m ensurepip
|
||||
./python -m pip install --upgrade pip --disable-pip-version-check --no-warn-script-location
|
||||
./python -m pip install --upgrade --force-reinstall pip --disable-pip-version-check --no-warn-script-location
|
||||
|
||||
echo "Create complete file"
|
||||
touch $PYTHON_TOOLCACHE_VERSION_PATH/x64.complete
|
||||
|
||||
@@ -135,7 +135,7 @@ if ($MajorVersion -ne "2") {
|
||||
Write-Host "Install and upgrade Pip"
|
||||
$Env:PIP_ROOT_USER_ACTION = "ignore"
|
||||
$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 --force-reinstall pip --no-warn-script-location"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Throw "Error happened during pip installation / upgrade"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user