1

enter image description here

I have used below github workflow.

name: Python application

on:
  push:
    branches: [ test ]
  pull_request:
    branches: [ test ]

permissions:
  contents: read

jobs:
  build:

    runs-on: test-excel

    strategy:
      matrix:
        python-version: [ "3.8", "3.9", "3.10" ]
    steps:
      - uses: actions/checkout@v3
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v3
        with:
          python-version: ${{ matrix.python-version }}

      - name: Create and start virtual environment
        run: |
          python -m venv venv
          source venv/bin/activate

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install openpyxl
          pip install -r requirements.txt
       
      - name: Run the app
        run: |
          streamlit run app.py
Adriaan
  • 17,741
  • 7
  • 42
  • 75
  • Please copy/paste error messages instead of screenshots. This allows other people with the same problem to find your question. – rethab Jun 03 '22 at 12:03

1 Answers1

1

It seems you are using a self-hosted runner (runs-on: test-excel).

According to the actions/setup-python documentation

Python distributions are only available for the same environments that GitHub Actions hosted environments are available for. If you are using an unsupported version of Ubuntu such as 19.04 or another Linux distribution such as Fedora, setup-python will not work. If you have a supported self-hosted runner and you would like to use setup-python, there are a few extra things you need to make sure are set up so that new versions of Python can be downloaded and configured on your runner.

There also shared different steps according to the operating system used for configuring the self-hosted runner with the action.

You screen shows itens related to Powershell, so I suppose your self-hosted runner is using Windows. In that case, here are their recommendations for windows (and here for linux and macos)

Last tip:

If you are experiencing problems while configuring Python on your self-hosted runner, turn on step debugging to see additional logs.

Note that it's hard to give you a proper answer without more context. You'll probably have to dig more using those steps above and update your question afterwards if the error persists.

GuiFalourd
  • 15,523
  • 8
  • 44
  • 71