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

Unable to install python #148

Closed
omgreenfield opened this issue Mar 12, 2020 · 5 comments
Closed

Unable to install python #148

omgreenfield opened this issue Mar 12, 2020 · 5 comments
Labels
area/runner Relating to errors in the runner meta/workaround A workaround has been identified.

Comments

@omgreenfield
Copy link

Others have posted this same issue and those issues have been marked as closed, but I haven't seen a solution.

Related tickets:

Upon running the act, python fails to install.

Thanks in advance for the help.

Action YAML

name: CI
on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v1.1.1 # or v1
        with:
          python-version: 3.7 # have also tried omitting this

Log

vagrant@ubuntu-xenial:~/frontend$ act
[TAP CI - dev/Deploy TAP package] ��  Start image=node:12.6-buster-slim
[TAP CI - dev/Deploy TAP package]   ��  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[TAP CI - dev/Deploy TAP package]   ��  docker cp src=/home/vagrant/frontend/. dst=/github/workspace

[TAP CI - dev/Deploy TAP package] ⭐⭐  Run actions/checkout@v2
[TAP CI - dev/Deploy TAP package]   ✅✅  Success - actions/checkout@v2
[TAP CI - dev/Deploy TAP package] ⭐⭐  Run actions/setup-python@v1.1.1
[TAP CI - dev/Deploy TAP package]   ☁  git clone 'https://github.com/actions/setup-python' # ref=v1.1.1
[TAP CI - dev/Deploy TAP package]   ��  docker cp src=/home/vagrant/.cache/act/actions-setup-python@v1.1.1 dst=/actions/
[TAP CI - dev/Deploy TAP package]   ��  ##[debug]Semantic version spec of 3.7 is 3.7
[TAP CI - dev/Deploy TAP package]   ��  ##[debug]isExplicit:
[TAP CI - dev/Deploy TAP package]   ��  ##[debug]explicit? false
[TAP CI - dev/Deploy TAP package]   ��  ##[debug]evaluating 0 versions
[TAP CI - dev/Deploy TAP package]   ��  ##[debug]match not found
[TAP CI - dev/Deploy TAP package]   ❗❗  ##[error]Version 3.7 with arch x64 not found%0AAvailable versions:%0A%0A
[TAP CI - dev/Deploy TAP package]   ❌❌  Failure - actions/setup-python@v1.1.1
Error: exit with `FAILURE`: 1
@cplee
Copy link
Contributor

cplee commented Mar 12, 2020

@omgreenfield I believe the problem here is the runner you are using. See here: https://github.com/nektos/act#runners

@cplee cplee added area/runner Relating to errors in the runner meta/workaround A workaround has been identified. labels Mar 12, 2020
@cplee
Copy link
Contributor

cplee commented Mar 12, 2020

Also, see #107

@konserw
Copy link

konserw commented Mar 14, 2020

Hi! I also have the same problem running on wiindows host, even with act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04:

PS C:\pyOffer> act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -v
time="2020-03-14T11:21:42+01:00" level=debug msg="Loading workflows from 'C:\\pyOffer\\.github\\workflows'"
time="2020-03-14T11:21:42+01:00" level=debug msg="Reading workflow 'C:\\pyOffer\\.github\\workflows\\test.yml'"
time="2020-03-14T11:21:42+01:00" level=debug msg="Using detected workflow event: push"
time="2020-03-14T11:21:42+01:00" level=debug msg="Planning event: push"
time="2020-03-14T11:21:42+01:00" level=debug msg="Loading slug from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:42+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:42+01:00" level=debug msg="Loading revision from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:42+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:42+01:00" level=debug msg="HEAD points to 'dd899e9d7a52d304ef99a73de4e1af4325c8c827'"
time="2020-03-14T11:21:42+01:00" level=debug msg="HEAD matches \\refs\\heads\\master"
time="2020-03-14T11:21:42+01:00" level=debug msg="using github ref: \\refs\\heads\\master"
[test/build] 🚀  Start image=nektos/act-environments-ubuntu:18.04
[test/build]   🐳  docker pull nektos/act-environments-ubuntu:18.04
time="2020-03-14T11:21:42+01:00" level=debug msg="Image exists? true"
[test/build] Removed container: 0c7c4d0040e0f336fa91d3e73b368ae35ff9a461eb46ecf5e3596f61b832a77c
[test/build]   🐳  docker create image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null                                                                                                                                                                 "] cmd=[]
[test/build] Created container name=act-test-build id=65d8d1c70237aa9e0b01878132176f8a87a172d2394de8a045ee8eb3a3aa2df9                                                                                                                                                                  from image nektos/act-environments-ubuntu:18.04
[test/build] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache]
[test/build]   🐳  docker run image=nektos/act-environments-ubuntu:18.04 entrypoint=["/usr/bin/tail" "-f" "/dev/null"]                                                                                                                                                                  cmd=[]
[test/build] Starting container: 65d8d1c70237aa9e0b01878132176f8a87a172d2394de8a045ee8eb3a3aa2df9
[test/build] Started container: 65d8d1c70237aa9e0b01878132176f8a87a172d2394de8a045ee8eb3a3aa2df9
[test/build]   🐳  docker cp src=C:\pyOffer/. dst=/github/workspace
time="2020-03-14T11:21:42+01:00" level=debug msg="Writing tarball C:\\Users\\konse\\AppData\\Local\\Temp\\act202805307                                                                                                                                                                  from C:\\pyOffer/."
time="2020-03-14T11:21:42+01:00" level=debug msg="Stripping prefix:C:\\pyOffer\\ src:C:\\pyOffer/."
[test/build] Extracting content from 'C:\Users\konse\AppData\Local\Temp\act202805307' to '/github/workspace'
time="2020-03-14T11:21:43+01:00" level=debug msg="Writing entry to tarball workflow/event.json len:2"
time="2020-03-14T11:21:43+01:00" level=debug msg="Writing entry to tarball home/.act len:0"
[test/build] Extracting content to '/github/'
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading slug from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading revision from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD points to 'dd899e9d7a52d304ef99a73de4e1af4325c8c827'"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD matches \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="using github ref: \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="setupEnv => map[GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:nekt                                                                                                                                                                 os/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:\\refs\\heads\\master GITHUB_REP                                                                                                                                                                 OSITORY:konserw/pyOffer GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:dd899e9d7a52d304ef99a73de4e1af4325c8c827 GITHUB_                                                                                                                                                                 WORKFLOW:test GITHUB_WORKSPACE:/github/workspace HOME:/github/home]"
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading slug from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading revision from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD points to 'dd899e9d7a52d304ef99a73de4e1af4325c8c827'"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD matches \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="using github ref: \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="context env => map[GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTOR:n                                                                                                                                                                 ektos/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:\\refs\\heads\\master GITHUB_                                                                                                                                                                 REPOSITORY:konserw/pyOffer GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:dd899e9d7a52d304ef99a73de4e1af4325c8c827 GITH                                                                                                                                                                 UB_WORKFLOW:test GITHUB_WORKSPACE:/github/workspace HOME:/github/home]"
[test/build] ⭐  Run actions/checkout@v2
[test/build] Skipping actions/checkout
[test/build]   ✅  Success - actions/checkout@v2
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading slug from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading revision from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD points to 'dd899e9d7a52d304ef99a73de4e1af4325c8c827'"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD matches \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="using github ref: \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="setupEnv => map[GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:nekt                                                                                                                                                                 os/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:\\refs\\heads\\master GITHUB_REP                                                                                                                                                                 OSITORY:konserw/pyOffer GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:dd899e9d7a52d304ef99a73de4e1af4325c8c827 GITHUB_                                                                                                                                                                 WORKFLOW:test GITHUB_WORKSPACE:/github/workspace HOME:/github/home INPUT_PYTHON-VERSION:3.8]"
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading slug from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="Loading revision from git directory 'C:\\pyOffer\\.git'"
time="2020-03-14T11:21:43+01:00" level=debug msg="Found revision: dd899e9d7a52d304ef99a73de4e1af4325c8c827\n"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD points to 'dd899e9d7a52d304ef99a73de4e1af4325c8c827'"
time="2020-03-14T11:21:43+01:00" level=debug msg="HEAD matches \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="using github ref: \\refs\\heads\\master"
time="2020-03-14T11:21:43+01:00" level=debug msg="context env => map[GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTOR:n                                                                                                                                                                 ektos/act GITHUB_EVENT_NAME:push GITHUB_EVENT_PATH:/github/workflow/event.json GITHUB_REF:\\refs\\heads\\master GITHUB_                                                                                                                                                                 REPOSITORY:konserw/pyOffer GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SHA:dd899e9d7a52d304ef99a73de4e1af4325c8c827 GITH                                                                                                                                                                 UB_WORKFLOW:test GITHUB_WORKSPACE:/github/workspace HOME:/github/home INPUT_PYTHON-VERSION:3.8]"
[test/build] ⭐  Run Set up Python 3.8
[test/build]   cloning https://github.com/actions/setup-python to act/actions-setup-python@v1
[test/build] Unable to pull refs/heads/v1: non-fast-forward update
[test/build] Cloned https://github.com/actions/setup-python to act/actions-setup-python@v1
[test/build] Checked out v1
time="2020-03-14T11:21:43+01:00" level=debug msg="Read action &{Setup Python GitHub Set up a specific version of Python                                                                                                                                                                  and add the command-line tools to the PATH. map[architecture:{The target architecture (x86, x64) of the Python interpr                                                                                                                                                                 eter. false x64} python-version:{Version range or exact version of a Python version to use, using SemVer's version rang                                                                                                                                                                 e syntax. false 3.x}] map[python-version:{The installed python version. Useful when given a version range as input.}] {                                                                                                                                                                 node12 map[] dist/index.js  [] []} {yellow code}} from 'act\\actions-setup-python@v1\\action.yml'"
time="2020-03-14T11:21:43+01:00" level=debug msg="About to run action &{Setup Python GitHub Set up a specific version of Python and add the command-line tools to the PATH. map[architecture:{The target architecture (x86, x64) of the Python interpreter. false x64} python-version:{Version range or exact version of a Python version to use, using SemVer's version range syntax. false 3.x}] map[python-version:{The installed python version. Useful when given a version range as input.}] {node12 map[] dist/index.js  [] []} {yellow code}}"
time="2020-03-14T11:21:43+01:00" level=debug msg="type=3 actionDir=act/actions-setup-python@v1 Workdir=C:\\pyOffer ActionCacheDir=act actionName=/actions-setup-python@v1 containerActionDir=/actions"
[test/build]   🐳  docker cp src=act/actions-setup-python@v1 dst=/actions\
time="2020-03-14T11:21:43+01:00" level=debug msg="Writing tarball C:\\Users\\konse\\AppData\\Local\\Temp\\act886541918 from act/actions-setup-python@v1"
time="2020-03-14T11:21:43+01:00" level=debug msg="Stripping prefix:act\\ src:act/actions-setup-python@v1"
[test/build] Extracting content from 'C:\Users\konse\AppData\Local\Temp\act886541918' to '/actions\'
[test/build] Exec command '[node \actions\actions-setup-python@v1\dist\index.js]'
| internal/modules/cjs/loader.js:985
|   throw err;
|   ^
|
| Error: Cannot find module '/github/workspace/\actions\actions-setup-python@v1\dist\index.js'
|     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:982:15)
|     at Function.Module._load (internal/modules/cjs/loader.js:864:27)
|     at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
|     at internal/main/run_main_module.js:18:47 {
|   code: 'MODULE_NOT_FOUND',
|   requireStack: []
| }
[test/build]   ❌  Failure - Set up Python 3.8
time="2020-03-14T11:21:44+01:00" level=debug msg="exit with `FAILURE`: 1"
time="2020-03-14T11:21:44+01:00" level=debug msg="exit with `FAILURE`: 1"
time="2020-03-14T11:21:44+01:00" level=debug msg="exit with `FAILURE`: 1"
time="2020-03-14T11:21:44+01:00" level=debug msg="exit with `FAILURE`: 1"
time="2020-03-14T11:21:44+01:00" level=debug msg="exit with `FAILURE`: 1"
Error: exit with `FAILURE`: 1

I've also tried with python 3.7 and 3.6 and it still fails.

@konserw
Copy link

konserw commented Mar 14, 2020

I think it might be due to windows path separator () mixed in posix paths (/)
EDIT:
Ok, sorry for mess, I think my issue is actually #145
EDIT2:
Yeap - it's working fine from WSL with nektos/act-environments-ubuntu:18.04 image (normal doesn't have python 3.8), for future reference I've used:

@omgreenfield
Copy link
Author

Whoops. I guess I don't know how to read.

act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 was the thing that did it.

As the runners section says, the slim images don't come with all the fancy stuff GitHub's images do. So if you're expected that stuff, use GitHub's image with the above command.

@cplee cplee closed this as completed Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runner Relating to errors in the runner meta/workaround A workaround has been identified.
Projects
None yet
Development

No branches or pull requests

3 participants