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

error: externally-managed-environment on ubuntu ubuntu-24.04 #128

Open
axel7083 opened this issue Jun 21, 2024 · 5 comments
Open

error: externally-managed-environment on ubuntu ubuntu-24.04 #128

axel7083 opened this issue Jun 21, 2024 · 5 comments

Comments

@axel7083
Copy link

When using the latest version we are getting the following

/usr/bin/pip install docutils
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.
Error: Error: The process '/usr/bin/pip' failed with exit code 1

workflow file

name: Validate website language on pull request

on:
  pull_request:
    paths:
      - 'website/**'

jobs:
  vale:
    name: runner / vale
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - uses: errata-ai/vale-action@v2.1.0
        env:
          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
        with:
          files: website
          fail_on_error: false
@kayx23
Copy link

kayx23 commented Sep 26, 2024

Same error on ubuntu-24.04. Following.

Current fix: reverting to 22.04.

@zhangtbj
Copy link

zhangtbj commented Oct 8, 2024

Same error on ubuntu-24.04. Following.

Current fix: reverting to 22.04.

👍 It also works for me after rollback to the ubuntu 22.04

@burgerdev
Copy link

This workaround allows staying on 24.04:

name: reviewdog
on: [pull_request]

jobs:
  vale:
    name: runner / vale
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v3
      - run: |
          venv="$HOME/.local/share/venv"
          python3 -m venv "$venv"
          echo "$venv/bin" >> $GITHUB_PATH
      - uses: errata-ai/vale-action@reviewdog

apinnick added a commit to apinnick/foreman-documentation that referenced this issue Oct 10, 2024
apinnick added a commit to apinnick/foreman-documentation that referenced this issue Oct 10, 2024
@ekohl
Copy link

ekohl commented Oct 10, 2024

For what it's worth, GitHub is rolling out an update of ubuntu-latest to refer to 24.04. This is happening in stages, so not everyone sees it at the same time. Quoting https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/

The ubuntu-latest label will migrate to Ubuntu 24 over the course of the next month, beginning September 23rd and finishing on October 30th. During migration, you can determine if your job has migrated by viewing the “Runner Image” information in the “Set up job” step of your Actions logs.

Users who follow the usage example in README will run into this problem more and more.

@jdkato
Copy link
Member

jdkato commented Oct 10, 2024

These dependencies are only required in certain cases (using reStructuredText or AsciiDoc) and rarely together, so I think in the next release I will stop installing them.

This means that users of those formats will have to install one on their own, but this is already true for DITA.

maximiliankolb pushed a commit to ATIX-AG/foreman-documentation that referenced this issue Oct 11, 2024
ekohl pushed a commit to theforeman/foreman-documentation that referenced this issue Oct 11, 2024
ekohl pushed a commit to theforeman/foreman-documentation that referenced this issue Oct 11, 2024
mfussenegger added a commit to crate/crate that referenced this issue Oct 14, 2024
mergify bot pushed a commit to crate/crate that referenced this issue Oct 14, 2024
mergify bot pushed a commit to crate/crate that referenced this issue Oct 14, 2024
mergify bot pushed a commit to crate/crate that referenced this issue Oct 14, 2024
mergify bot pushed a commit to crate/crate that referenced this issue Oct 14, 2024
mergify bot pushed a commit to crate/crate that referenced this issue Oct 14, 2024
mergify bot pushed a commit to crate/crate that referenced this issue Oct 14, 2024
matriv pushed a commit to crate/crate that referenced this issue Oct 14, 2024
johncowen pushed a commit to kumahq/kuma-website that referenced this issue Oct 15, 2024
Adds navigation for `release-2.9.x` and fixes `404` on `/docs/2.9.x`.
Also fixes ci error in `Docs lint` due to [error: externally-managed-environment on ubuntu ubuntu-24.04](errata-ai/vale-action#128) when installing `docutils`, by pin ubuntu to `22.04`.
---------

Signed-off-by: schogges <moritz.fleck@konghq.com>
Co-authored-by: schogges <moritz.fleck@konghq.com>
jdkato added a commit that referenced this issue Oct 15, 2024
aireilly added a commit to aireilly/foreman-documentation that referenced this issue Oct 16, 2024
Vale action no longer installs asciidoctor by default. See errata-ai/vale-action#128 (comment) (edited)
apinnick pushed a commit to theforeman/foreman-documentation that referenced this issue Oct 16, 2024
Vale action no longer installs asciidoctor by default. See errata-ai/vale-action#128 (comment) (edited)
TerryHowe added a commit to oras-project/oras-www that referenced this issue Oct 18, 2024
Related: errata-ai/vale-action#128

```
Ensuring core python and ruby dependencies are present
/usr/bin/pip install docutils
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.
Error: Error: The process '/usr/bin/pip' failed with exit code 1
```

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
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