From 1b67a74d1289893c907b9d69a0ba4535f847c3b8 Mon Sep 17 00:00:00 2001 From: chase stanley Date: Wed, 6 May 2026 09:52:24 -0400 Subject: [PATCH] add variable URI_GETPIP39 to allow for backwards compatibility to python 3.9.x --- PythonEmbed4Win.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PythonEmbed4Win.ps1 b/PythonEmbed4Win.ps1 index 253652d..7e77ad8 100644 --- a/PythonEmbed4Win.ps1 +++ b/PythonEmbed4Win.ps1 @@ -145,6 +145,7 @@ if ("" -ne "${env:PROCESSOR_ARCHITECTURE}") { New-Variable -Name URI_GETPIP -Option ReadOnly -Force -Value ([URI] "https://bootstrap.pypa.io/get-pip.py") New-Variable -Name URI_GETPIP36 -Option ReadOnly -Force -Value ([URI] "https://bootstrap.pypa.io/pip/3.6/get-pip.py") +New-Variable -Name URI_GETPIP39 -Option ReadOnly -Force -Value ([URI] "https://bootstrap.pypa.io/pip/3.9/get-pip.py") New-Variable -Name URI_PYTHON_VERSIONS -Option ReadOnly -Force -Value ([URI] "https://www.python.org/ftp/python") function URI-Combine @@ -1165,6 +1166,9 @@ Also, this installation cannot create new virtual environments. if ($ver -lt [System.Version]"3.7") { $uri_getpip1 = $URI_GETPIP36 } + elseif ($ver -lt [System.Version]"3.10") { + $uri_getpip1 = $URI_GETPIP39 + } Download $uri_getpip1 $path_getpip & $python_exe -O $path_getpip --no-warn-script-location if ($LastExitCode -ne 0) {