From 69e130c7049552d59df8ab61094886f05ba267e9 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Wed, 30 Mar 2022 16:03:23 +0200 Subject: [PATCH] [Windows] Add pip.exe alias if missing (#5308) --- images/win/scripts/Installers/Install-PyPy.ps1 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/images/win/scripts/Installers/Install-PyPy.ps1 b/images/win/scripts/Installers/Install-PyPy.ps1 index dd7d8efb2..eb31c86f4 100644 --- a/images/win/scripts/Installers/Install-PyPy.ps1 +++ b/images/win/scripts/Installers/Install-PyPy.ps1 @@ -52,6 +52,14 @@ function Install-PyPy cmd.exe /c "cd /d $pypyArchPath && mklink python.exe $pypyName && python.exe -m ensurepip && python.exe -m pip install --upgrade pip" } + # Create pip.exe if missing + $pipPath = Join-Path -Path $pypyArchPath -ChildPath "Scripts/pip.exe" + if (-not (Test-Path $pipPath)) + { + $pip3Path = Join-Path -Path $pypyArchPath -ChildPath "Scripts/pip3.exe" + Copy-Item -Path $pip3Path -Destination $pipPath + } + if ($LASTEXITCODE -ne 0) { Throw "Error happened during PyPy installation"