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

Reverted Python to v3.x working for pre-commit #10721

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

ppatierno
Copy link
Member

@ppatierno ppatierno commented Oct 16, 2024

We started to face the following issue when running the pre-commit action:

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 66[8](https://github.com/strimzi/strimzi-kafka-operator/actions/runs/11349857009/job/31569820324?pr=10720#step:4:10) for the detailed specification.
Error: Process completed with exit code 1.

There are several issues on the pre-commit repo explaining that it's related to latest upgrades to Debian/Ubuntu managing Python version and conflicting with what pre-commit needs, which is Python v3.
This PR tries to fix the issue by changing the setup-python action moving from current v5 to a v3.1.4

@ppatierno ppatierno added this to the 0.44.0 milestone Oct 16, 2024
@ppatierno ppatierno merged commit bb133e2 into strimzi:main Oct 16, 2024
13 checks passed
@ppatierno ppatierno deleted the fix-pre-commit branch October 16, 2024 08:29
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

Successfully merging this pull request may close these issues.

3 participants