mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #418] Python 3.9 installation fails with act but works on Github #290
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tomasaschan on GitHub (Nov 12, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/418
Consider the following definition:
This works when running on Github, as can be seen in the log here (that build fails on a later, unrelated, step) but when running locally with
actit fails to find the 3.9 version, and logs the following output:Is this a problem in my setup, a bug in
actor a third party issue?@tomasaschan commented on GitHub (Nov 14, 2020):
I think I figured out what the problem is: On Github,
ubuntu-latestseems to refer to Ubuntu 20.04, whileactresolves it as 18.04. Specifyingubuntu-20.04explicitly in the workflow definition doesn't work either, because that's not available at all inact.My workaround was to build the following Docker image and tag it
ubuntu-builder, and then runact -P ubuntu-latest=ubuntu-builder:The reason it doesn't work with just
act -P ubuntu-latest=ubuntu:20.04is, it seems to me, that actions themselves need node to be installed. There currently is not anodeimage based on a recent enough Debian version, which I suppose is whyactdoesn't support this out of the box in the first place.@hugoprudente commented on GitHub (Nov 27, 2020):
@tomasaschan solution works for me too, thanks!
@fericsepi commented on GitHub (Dec 9, 2020):
I think it fails to find any version really, I'm trying to pin it to Python 3.7.9 without much luck.
I tried even with
ubuntu-18.04and it cannot find the python version in the cache.related lines:
What I would expect is that it downloads the relevant version if it's not available in the cache.
@catthehacker commented on GitHub (Dec 9, 2020):
Current image
nektos/act-environments-ubuntu:18.04contains only these versions:In order to use https://github.com/actions/setup-python on self-hosted runner (which what
actdoes basically), there are few restrictions mentioned in the https://github.com/actions/setup-python#using-setup-python-with-a-self-hosted-runnerMy guess is that's due to environment variable that is missing since the image doesn't source the
/etc/environmentfileThe action in workflow I copied from issue author seems to work fine with my image (`ubuntu-20.04`):
@github-actions[bot] commented on GitHub (Jan 16, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@tomasaschan commented on GitHub (Jan 18, 2021):
Commenting just to remove the stale label.
@catthehacker commented on GitHub (Jan 18, 2021):
Action
setup-pythonrequires some kind of Python version already available in/opt/hostedtoolcache, that's not possible to be fixed by modifyingactitself, docker image used inacthas to have that pre-requisite.@pwoolvett commented on GitHub (Feb 10, 2021):
Tried this today, with act installed in a
devcontainer(yo dawg),actions/setup-python@v1+ubuntu-latestlanded me here.This is working
@github-actions[bot] commented on GitHub (Mar 13, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@amyb-asu commented on GitHub (Oct 3, 2024):
This is a major issue for us. Act works fine for a few people but everyone else has this error and can't run any of our workflows... I can't figure out what the difference between the working and not working are, since everyone is using the same recent build of
catthehacker/ubuntu:act-latestas the runtime image. I don't understand why the action works for some people on that image but not for anyone else...For context I am trying to use python version 3.10 (any sub version of that is fine... just need it to work)