每次我尝试在 GitHub Actions 中运行工作流程时,我都会遇到安装 Python 的问题。我必须在 Windows 上的我自己的 PC 上运行这个自托管运行程序。我每次都以完全管理员权限运行它。我不知道我在这里做错了什么。这是 Python 11 的示例。我尝试了很多不同的版本。我运行的是 3.12.1,我已经测试过,但不起作用。每次销毁之前的操作运行程序后,我都必须创建一个新文件夹。有什么想法吗?
Version 3.11 was not found in the local cache
Version 3.11 is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/3.11.7-7098196908/python-3.11.7-win32-x64.zip"
Extract downloaded archive
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 { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\Users\jorda\actions-runner\_work\_temp\36383fb1-ebad-446f-8b18-09c33c08fd93', 'C:\Users\jorda\actions-runner\_work\_temp\be064470-037b-412c-aff9-30ad947a6345')"
Execute installation script
Check if Python hostedtoolcache folder exist...
Create Python toolcache folder
Check if current Python version is installed...
No Python3.11.* found
Remove registry entries for Python 3.11(x64)...
Create Python 3.11.7 folder in C:\Users\jorda\actions-runner\_work\_tool\Python
Copy Python binaries to C:\Users\jorda\actions-runner\_work\_tool\Python\3.11.7\x64
Install Python 3.11.7 in C:\Users\jorda\actions-runner\_work\_tool\Python...
Error: Error happened during Python installation
At C:\Users\jorda\actions-runner\_work\_temp\be064470-037b-412c-aff9-30ad947a6345\setup.ps1:127 char:5
+ Throw "Error happened during Python installation"
Error: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Error happened ...on installation:String) [], RuntimeException
+ FullyQualifiedErrorId : Error happened during Python installation
Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1
我在 Windows 上面临同样的问题,那么有什么解决方案可以解决这个问题吗?如果是的话,请分享一下。