Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to extract Python archive on new Windows ARM ARM64 Github-hosted runner (Python 3.11 and 3.12) #931

Closed
2 of 5 tasks
remyroy opened this issue Aug 28, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@remyroy
Copy link

remyroy commented Aug 28, 2024

Description:
When running actions/setup-python on the new Windows ARM64 (Windows 11, win11-23h2-ent, 22631.4037.240811) Github-hosted runner, actions/setup-python fails to extract the downloaded Python archive with the following error message:

2024-08-28T19:04:16.9899589Z Version 3.11 was not found in the local cache
2024-08-28T19:04:17.5148737Z Version 3.11 is available for downloading
2024-08-28T19:04:17.5151779Z Download from "https://github.com/actions/python-versions/releases/download/3.11.9-9947079978/python-3.11.9-win32-arm64.zip"
2024-08-28T19:04:18.8356455Z Extract downloaded archive
2024-08-28T19:04:18.8618205Z [command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath 'C:\a\_temp\e96f0212-2cd0-4dfe-96ce-92679ace3471' -DestinationPath 'C:\a\_temp\1b3eec54-24ab-4647-a8ef-a58f3381d6b7' -Force } else {[System.IO.Compression.ZipFile]::ExtractToDirectory('C:\a\_temp\e96f0212-2cd0-4dfe-96ce-92679ace3471', 'C:\a\_temp\1b3eec54-24ab-4647-a8ef-a58f3381d6b7', $true) }"
2024-08-28T19:04:20.6119610Z Expand-Archive :  is not a supported archive file format. .zip is the only supported archive file format.
2024-08-28T19:04:20.6121257Z At line:1 char:210
2024-08-28T19:04:20.6122410Z + ...  Ignore)) { Expand-Archive -LiteralPath 'C:\a\_temp\e96f0212-2cd0-4df ...
2024-08-28T19:04:20.6123881Z +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-08-28T19:04:20.6126060Z     + CategoryInfo          : InvalidArgument: (:String) [Expand-Archive], IOException
2024-08-28T19:04:20.6127876Z     + FullyQualifiedErrorId : NotSupportedArchiveFileExtension,Expand-Archive
2024-08-28T19:04:20.6128956Z  
2024-08-28T19:04:20.6415206Z ##[error]The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1

This is similar for Python 3.11 and Python 3.12.

Full job log can be found on:

From

Action version:
Specify the action version: actions/setup-python@v5 (SHA:39cd14951b08e74b54015e9e001cdefcf80e669f)

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
Python versions 3.11 and 3.12

Repro steps:

  1. Create or have a GitHub organization with Team or above plan
  2. Go into your organization settings, in Actions > Runners
  3. Click the New Runner button and select the New GitHub-hosted runner option.
  4. In the runner Platform, select Windows ARM64
  5. In the runner Image, select Microsoft Windows 11 (Preview)
  6. Give the runner an easy to use name and keep the other options as default or as usable for this test.
  7. Create a workflow similar to this one to use Python 3.11 and/or Python 3.12 on that new GitHub runner running on Windows ARM64.
  8. Observe that actions/setup-python fails to extract the downloaded Python image when the workflow is triggered.

Expected behavior:
When using the official Github-hosted runner with the new Windows ARM64 image and actions/setup-python@v5 in a workflow, it should be able to download, extract and install Python 3.11 and 3.12 correctly to be used in various CI/Build automation processes.

Actual behavior:
When using the official Github-hosted runner with the new Windows ARM64 image and actions/setup-python@v5 in a workflow, it fails to extract and properly install Python 3.11 and 3.12 correctly to be used in various CI/Build automation processes.

@remyroy remyroy added bug Something isn't working needs triage labels Aug 28, 2024
@priyagupta108
Copy link
Contributor

Hi @remyroy 👋,
Thank you for your report. We'll investigate the issue and get back to you.

@priyagupta108
Copy link
Contributor

Hello @remyroy,

The fix for this issue has been implemented in PR#916. This fix is now available in the newly released actions/setup-python v5.2.0, and the v5 tag has been updated accordingly. Please verify if your issue is resolved with this update.
Thank you!

@yorickdowne
Copy link

yorickdowne commented Sep 2, 2024

Progress! Python 3.11 and Python 3.12 install successfully. However, pip can then not install wheel with this error:

distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

@priyagupta108 , should that be a default component on the Windows 11 ARM64 runner image, or is setup-python responsible for the dependency?

@yorickdowne
Copy link

Answering my own question: Dev tools belong in the base image. A new image for Win Arm64 is being prepared, see linked issue.

@priyagupta108
Copy link
Contributor

Hello 👋,
Thank you for the update! It's great to hear that Python 3.11 and 3.12 are installing successfully.
As you correctly mentioned, developer tools should indeed be included in the base image, and the new Windows ARM64 image will include them.

Since the extraction issue has been resolved, I will now close this issue. If there are any further questions or concerns, please feel free to open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants