Act: Can not start python environment in MacOS

Created on 12 Oct 2020  路  3Comments  路  Source: nektos/act

I run act push -j fastapi, then I got a error

Screen Shot 2020-10-12 at 09 15 45

This is the action file

name: Test

on: [push]

jobs:
  fastapi:
    runs-on: ubuntu-latest
    # if: "contains(github.event.head_commit.message, 'FASTAPI: ')"
    strategy:
      matrix:
        python-version: [3.6, 3.7, 3.8]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install cookiecutter
      run: |
        pip install cookiecutter
    - name: Test generate
      run: |
        cookiecutter --no-input fastapi -o target

Who can help me to resolve this problem?

Most helpful comment

I also have this problem, it appears to be a duplicate of #251. As mentioned on that issue, try using the alternative runner image with one of the following flags depending on which image you've specified in your workflow.

-P ubuntu-latest=nektos/act-environments-ubuntu:18.04
or
-P ubuntu-18.04=nektos/act-environments-ubuntu:18.04

All 3 comments

Same problem on Ubuntu 20.04. Workflow works fine on Github Actions, but fail with same error using act.

jobs:
  test:
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: '11'
      - uses: actions/setup-go@v1
        with:
          go-version: '1.13.8'
      - uses: actions/setup-node@v1
        with:
          node-version: '10.x'
      - uses: actions/setup-python@v2
        with:
          python-version: '2.7'
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v1
        with:
          version: v1.30
          working-directory: src/backend

I also have this problem, it appears to be a duplicate of #251. As mentioned on that issue, try using the alternative runner image with one of the following flags depending on which image you've specified in your workflow.

-P ubuntu-latest=nektos/act-environments-ubuntu:18.04
or
-P ubuntu-18.04=nektos/act-environments-ubuntu:18.04

this problem was solved 馃憤 thank you @davidjmeyer

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mheap picture mheap  路  5Comments

Applelo picture Applelo  路  5Comments

kochetkovIT picture kochetkovIT  路  4Comments

ovitente picture ovitente  路  6Comments

dskvr picture dskvr  路  4Comments