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

Github actions sequence with ubuntu latest do not allow poetry installation #76

Open
alexsoaresilva opened this issue Oct 14, 2024 · 6 comments

Comments

@alexsoaresilva
Copy link

Today (Otc 14) a PR raised in my company's org triggered the following error:

Run abatilo/actions-poetry@v2
Run pip install -U poetry
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Now all PRs on python repos that use this action are failing with the same error.

the sequence of github actions that lead to running actions-poetry v2:

    name: Poetry Build Pipeline
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Python
        uses: actions/setup-python@v5
        with:
          python-version-file: '.python-version'

      - name: Install Poetry
        uses: abatilo/actions-poetry@v2
@yaoice
Copy link

yaoice commented Oct 15, 2024

+1

@funkyfuture
Copy link

y'all can replace this action in Ubuntu runners with:

pipx install poetry

@ShedPlant
Copy link

ShedPlant commented Oct 21, 2024

y'all can replace this action in Ubuntu runners with:

pipx install poetry

I had a problem (whether or not using this GHA action) on the ubuntu-24.04 runner that poetry on the path would be an older version pre-installed on the runner.

Previously my CI was:

  - name: Install Poetry
    uses: abatilo/actions-poetry@v3
    with:
      poetry-version: 1.5.1

Now:

  - name: Install Poetry
    shell: bash
    run: |
      pipx install poetry==1.8.4  --python python3.9
      echo $PIPX_BIN_DIR >> $GITHUB_PATH

@mmontesi
Copy link

@abatilo FYI, it looks like you re-tagged v2 from master, so v2 is now aligned with v3 and it broke my self-hosted runners.
I had to stick to v2.4.0 to make it work again.

abatilo added a commit that referenced this issue Oct 28, 2024
We had a breaking change and I should have stopped updating v2 as a
moving tag.

This was highlighted by @mmontesi in #76 (comment)
abatilo added a commit that referenced this issue Oct 28, 2024
We had a breaking change and I should have stopped updating v2 as a
moving tag.

This was highlighted by @mmontesi in #76 (comment)
@abatilo
Copy link
Owner

abatilo commented Oct 28, 2024

Very sorry about that @mmontesi. I've fixed this as a part of #80

@mmontesi
Copy link

Thanks @abatilo , really appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants