actions / actions/setup-python

setup-python fails on self hosted runners where runner has no administrator permissions

Open
#1,308 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
2.2k
Forks
739
Avg merge
6d 18h
Merged PRs (30d)
1

Description

Description:
Setup-python fails on self hosted runners where runner has no administrator permissions.
Throw "Error happened during Python installation"

Action version:
setup-python@v6.2.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • [ X Self-hosted

Repro steps:
use self hosted runner, give runner accounts no administrative permissions

Expected behavior:
Python installs

Actual behavior:
Python installation fails

Root cause is this code line:
"DefaultAllUsersTargetDir=$PythonArchPath InstallAllUsers=1 $Include_freethreaded"
specific InstallAllUsers=1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Windows installation code containing DefaultAllUsersTargetDir=$PythonArchPath InstallAllUsers=1 $Include_freethreaded and trace how it runs on self-hosted Windows runners. Reproduce with a runner account without administrator permissions, then verify that Python installs successfully without the administrator requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python, typescript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.