diff --git a/3.14-rc/windows/windowsservercore-1809/Dockerfile b/3.14-rc/windows/windowsservercore-1809/Dockerfile index ca6012734..61a8ce521 100644 --- a/3.14-rc/windows/windowsservercore-1809/Dockerfile +++ b/3.14-rc/windows/windowsservercore-1809/Dockerfile @@ -57,6 +57,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ + Write-Host 'Reinstalling pip to workaround a bug ...'; \ + # https://github.com/python/cpython/issues/133626 + # clean up broken pip install + Remove-Item -Recurse C:\Python\Lib\site-packages\pip*; \ + # install pip as pip.exe + python -m ensurepip --default-pip -vvv; \ + \ Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/3.14-rc/windows/windowsservercore-ltsc2022/Dockerfile b/3.14-rc/windows/windowsservercore-ltsc2022/Dockerfile index d177ea7b6..75ffda7b0 100644 --- a/3.14-rc/windows/windowsservercore-ltsc2022/Dockerfile +++ b/3.14-rc/windows/windowsservercore-ltsc2022/Dockerfile @@ -57,6 +57,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ + Write-Host 'Reinstalling pip to workaround a bug ...'; \ + # https://github.com/python/cpython/issues/133626 + # clean up broken pip install + Remove-Item -Recurse C:\Python\Lib\site-packages\pip*; \ + # install pip as pip.exe + python -m ensurepip --default-pip -vvv; \ + \ Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/3.14-rc/windows/windowsservercore-ltsc2025/Dockerfile b/3.14-rc/windows/windowsservercore-ltsc2025/Dockerfile index 5d3b7d088..ffc2b344d 100644 --- a/3.14-rc/windows/windowsservercore-ltsc2025/Dockerfile +++ b/3.14-rc/windows/windowsservercore-ltsc2025/Dockerfile @@ -57,6 +57,13 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ + Write-Host 'Reinstalling pip to workaround a bug ...'; \ + # https://github.com/python/cpython/issues/133626 + # clean up broken pip install + Remove-Item -Recurse C:\Python\Lib\site-packages\pip*; \ + # install pip as pip.exe + python -m ensurepip --default-pip -vvv; \ + \ Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/Dockerfile-windows.template b/Dockerfile-windows.template index add70eac7..115b08c21 100644 --- a/Dockerfile-windows.template +++ b/Dockerfile-windows.template @@ -55,6 +55,15 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ +{{ if .version == "3.14.0b1" then ( -}} + Write-Host 'Reinstalling pip to workaround a bug ...'; \ + # https://github.com/python/cpython/issues/133626 + # clean up broken pip install + Remove-Item -Recurse C:\Python\Lib\site-packages\pip*; \ + # install pip as pip.exe + python -m ensurepip --default-pip -vvv; \ + \ +{{ ) else "" end -}} Write-Host 'Verifying pip install ...'; \ pip --version; \ \