[GH-ISSUE #1639] Unable to install Python Poetry packages #814

Closed
opened 2026-03-01 21:46:37 +03:00 by kerem · 6 comments
Owner

Originally created by @AndrewRiggs-Atkins on GitHub (Feb 20, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1639

Bug report info

act version:            0.2.42
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:
        /home/administrator/.actrc:
                -P ubuntu-22.04=runner:latest
Build info:
        Go version:            go1.18.10
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.42 -X main.commit=72d03214c5ed8985bf23dc15440fa5301e9d13bf -X main.date=2023-02-02T00:57:22Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         72d03214c5ed8985bf23dc15440fa5301e9d13bf
                vcs.time:             2023-02-02T00:56:57Z
                vcs.modified:         false
Docker Engine:
        Engine version:        20.10.17
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Ubuntu 20.04.4 LTS
        OS type:               linux
        OS version:            20.04
        OS arch:               x86_64
        OS kernel:             5.15.79.1-microsoft-standard-WSL2
        OS CPU:                8
        OS memory:             15935 MB
        Security options:
                name=seccomp,profile=default

Command used with act

act -P ubuntu-latest=andrewriggsatkins/python-github-action-runner:latest -j poetry

Describe issue

When running the below command, it is expected that the Python packages defined in a local .toml file are installed using Poetry.

python3 -m poetry install

I can confirm the following (works/doesn't work):

  • Installation of Poetry using the following - python3 -m pip install poetry
  • Export of the Poetry Python packages - python3 -m poetry export --without-hashes --with dev --format=requirements.txt > requirements.txt
  • Install exported Poetry Python packages with Pip - python3 -m pip install -r ./requirements.txt
  • Installation of Poetry Packages - python3 -m poetry install

No response

Workflow content

name: Poetry

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  poetry:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Install Poetry
      run: python3 -m pip install poetry

    - name: Install Poetry Packages
      run: python3 -m poetry install

Relevant log output

[Poetry/poetry]   ✅  Success - Main Install Poetry
[Poetry/poetry] ⭐ Run Main Install Poetry Packages
[Poetry/poetry]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
| Creating virtualenv program-oVhNZiiP-py3.10 in /root/.cache/pypoetry/virtualenvs
| Using virtualenv: /root/.cache/pypoetry/virtualenvs/program-oVhNZiiP-py3.10
| Installing dependencies from lock file
|
| Finding the necessary packages for the current system
|
| Package operations: 122 installs, 1 update, 0 removals
|
[Poetry/poetry]   ❌  Failure - Main Install Poetry Packages
[Poetry/poetry] exitcode '1': failure
[Poetry/poetry] 🏁  Job failed
Error: Job 'poetry' failed

Additional information

No response

Originally created by @AndrewRiggs-Atkins on GitHub (Feb 20, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1639 ### Bug report info ```plain text act version: 0.2.42 GOOS: linux GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/administrator/.actrc: -P ubuntu-22.04=runner:latest Build info: Go version: go1.18.10 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -compiler: gc -ldflags: -s -w -X main.version=0.2.42 -X main.commit=72d03214c5ed8985bf23dc15440fa5301e9d13bf -X main.date=2023-02-02T00:57:22Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: 72d03214c5ed8985bf23dc15440fa5301e9d13bf vcs.time: 2023-02-02T00:56:57Z vcs.modified: false Docker Engine: Engine version: 20.10.17 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Ubuntu 20.04.4 LTS OS type: linux OS version: 20.04 OS arch: x86_64 OS kernel: 5.15.79.1-microsoft-standard-WSL2 OS CPU: 8 OS memory: 15935 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act -P ubuntu-latest=andrewriggsatkins/python-github-action-runner:latest -j poetry ``` ### Describe issue When running the below command, it is expected that the Python packages defined in a local `.toml` file are installed using Poetry. ```bash python3 -m poetry install ``` I can confirm the following (works/doesn't work): - [x] Installation of Poetry using the following - `python3 -m pip install poetry` - [x] Export of the Poetry Python packages - `python3 -m poetry export --without-hashes --with dev --format=requirements.txt > requirements.txt` - [x] Install exported Poetry Python packages with Pip - `python3 -m pip install -r ./requirements.txt` - [ ] Installation of Poetry Packages - `python3 -m poetry install` ### Link to GitHub repository _No response_ ### Workflow content ```yml name: Poetry on: push: branches: - main pull_request: jobs: poetry: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Poetry run: python3 -m pip install poetry - name: Install Poetry Packages run: python3 -m poetry install ``` ### Relevant log output ```sh [Poetry/poetry] ✅ Success - Main Install Poetry [Poetry/poetry] ⭐ Run Main Install Poetry Packages [Poetry/poetry] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir= | Creating virtualenv program-oVhNZiiP-py3.10 in /root/.cache/pypoetry/virtualenvs | Using virtualenv: /root/.cache/pypoetry/virtualenvs/program-oVhNZiiP-py3.10 | Installing dependencies from lock file | | Finding the necessary packages for the current system | | Package operations: 122 installs, 1 update, 0 removals | [Poetry/poetry] ❌ Failure - Main Install Poetry Packages [Poetry/poetry] exitcode '1': failure [Poetry/poetry] 🏁 Job failed Error: Job 'poetry' failed ``` ### Additional information _No response_
kerem 2026-03-01 21:46:37 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@AndrewRiggs-Atkins commented on GitHub (Feb 20, 2023):

Solution below:

name: Poetry

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  poetry:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    - name: Install Poetry
      run: python3 -m pip install poetry

    - name: Install Poetry Packages
      run: |
        python3 -m poetry config installer.max-workers 10
        python3 -m poetry install --no-interaction --no-ansi -vvv
[Poetry/poetry]   ✅  Success - Main Install Poetry
[Poetry/poetry] ⭐ Run Main Install Poetry Packages
[Poetry/poetry]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir=
| Loading configuration file /root/.config/pypoetry/config.toml
| Creating virtualenv program-oVhNZiiP-py3.10 in /root/.cache/pypoetry/virtualenvs
| Using virtualenv: /root/.cache/pypoetry/virtualenvs/program-oVhNZiiP-py3.10
| Installing dependencies from lock file
|
| Finding the necessary packages for the current system
|
| Package operations: 122 installs, 1 update, 0 removals
|
|   • Installing six (1.16.0)
|   • Installing markupsafe (2.1.2)
|   • Installing python-dateutil (2.8.2)
|   • Installing pyyaml (5.4.1)
|   • Installing click (8.1.3)
|   • Installing ghp-import (2.1.0)
|   • Installing jinja2 (3.1.2)
|   • Installing markdown (3.3.7)
|   • Installing mergedeep (1.3.4)
|   • Installing packaging (23.0)
|   • Installing pyyaml-env-tag (0.1)
|   • Installing watchdog (2.2.1)
|   • Installing attrs (22.2.0)
|   • Installing idna (3.4)
|   • Installing mkdocs (1.4.2)
|   • Installing sniffio (1.3.0)
|   • Installing anyio (3.6.2)
|   • Installing async-generator (1.10)
|   • Installing certifi (2022.12.7)

...

[Poetry/poetry]   ✅  Success - Main Install Poetry Packages
[Poetry/poetry] 🏁  Job succeeded
<!-- gh-comment-id:1437098724 --> @AndrewRiggs-Atkins commented on GitHub (Feb 20, 2023): Solution below: ```yaml name: Poetry on: push: branches: - main pull_request: jobs: poetry: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Poetry run: python3 -m pip install poetry - name: Install Poetry Packages run: | python3 -m poetry config installer.max-workers 10 python3 -m poetry install --no-interaction --no-ansi -vvv ``` ```bash [Poetry/poetry] ✅ Success - Main Install Poetry [Poetry/poetry] ⭐ Run Main Install Poetry Packages [Poetry/poetry] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/2] user= workdir= | Loading configuration file /root/.config/pypoetry/config.toml | Creating virtualenv program-oVhNZiiP-py3.10 in /root/.cache/pypoetry/virtualenvs | Using virtualenv: /root/.cache/pypoetry/virtualenvs/program-oVhNZiiP-py3.10 | Installing dependencies from lock file | | Finding the necessary packages for the current system | | Package operations: 122 installs, 1 update, 0 removals | | • Installing six (1.16.0) | • Installing markupsafe (2.1.2) | • Installing python-dateutil (2.8.2) | • Installing pyyaml (5.4.1) | • Installing click (8.1.3) | • Installing ghp-import (2.1.0) | • Installing jinja2 (3.1.2) | • Installing markdown (3.3.7) | • Installing mergedeep (1.3.4) | • Installing packaging (23.0) | • Installing pyyaml-env-tag (0.1) | • Installing watchdog (2.2.1) | • Installing attrs (22.2.0) | • Installing idna (3.4) | • Installing mkdocs (1.4.2) | • Installing sniffio (1.3.0) | • Installing anyio (3.6.2) | • Installing async-generator (1.10) | • Installing certifi (2022.12.7) ... [Poetry/poetry] ✅ Success - Main Install Poetry Packages [Poetry/poetry] 🏁 Job succeeded ```
Author
Owner

@mammo0 commented on GitHub (Feb 22, 2023):

Hello,

I had the same problem.
At least for me only the --no-ansi flag was necessary to make the poetry install command working again.

@AndrewRiggs-Atkins did you find out what is the root cause for this problem?

<!-- gh-comment-id:1440031309 --> @mammo0 commented on GitHub (Feb 22, 2023): Hello, I had the same problem. At least for me only the `--no-ansi` flag was necessary to make the `poetry install` command working again. @AndrewRiggs-Atkins did you find out what is the root cause for this problem?
Author
Owner

@AndrewRiggs-Atkins commented on GitHub (Feb 22, 2023):

Hello,

I had the same problem. At least for me only the --no-ansi flag was necessary to make the poetry install command working again.

@AndrewRiggs-Atkins did you find out what is the root cause for this problem?

Though its seemingly impossible to debug due to a lack of useful error messages, I believe it is likely due to how Poetry prints out the installation logs for each package. You are correct that the additional flags aren't required though.

<!-- gh-comment-id:1440037015 --> @AndrewRiggs-Atkins commented on GitHub (Feb 22, 2023): > Hello, > > I had the same problem. At least for me only the `--no-ansi` flag was necessary to make the `poetry install` command working again. > > @AndrewRiggs-Atkins did you find out what is the root cause for this problem? Though its seemingly impossible to debug due to a lack of useful error messages, I believe it is likely due to how Poetry prints out the installation logs for each package. You are correct that the additional flags aren't required though.
Author
Owner

@mammo0 commented on GitHub (Feb 22, 2023):

Thanks for your quick response.
I think this issue should be kept open, because other tools that use a similar output mechanism like Poetry could be also affected.

<!-- gh-comment-id:1440046383 --> @mammo0 commented on GitHub (Feb 22, 2023): Thanks for your quick response. I think this issue should be kept open, because other tools that use a similar output mechanism like Poetry could be also affected.
Author
Owner

@dodgyrabbit commented on GitHub (Feb 26, 2023):

Thank you for this post! Been struggling for the last few hours trying to figure this out.
--no-ansi solved this problem.

<!-- gh-comment-id:1445388867 --> @dodgyrabbit commented on GitHub (Feb 26, 2023): Thank you for this post! Been struggling for the last few hours trying to figure this out. `--no-ansi` solved this problem.
Author
Owner

@alvis commented on GitHub (Mar 14, 2023):

@AndrewRiggs-Atkins Thank you so much for providing the solution. It took me a few hour figuring out what went wrong in the script as there is no any useful message :/

<!-- gh-comment-id:1468525831 --> @alvis commented on GitHub (Mar 14, 2023): @AndrewRiggs-Atkins Thank you so much for providing the solution. It took me a few hour figuring out what went wrong in the script as there is no any useful message :/
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#814
No description provided.