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

fix(python): use system python-pipx to honor PEP 668 #209

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

palazzem
Copy link
Owner

Bug

Failing job: https://github.com/palazzem/hanzo/actions/runs/5262470093/jobs/9523058544

TASK [development : Installing Python isolated environments (pipx)] ************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["/usr/bin/python3", "-m", "pip.__main__", "install", "-U", "--user", "pipx"], "msg": "\n:stderr: error: externally-managed-environment\n\n× This environment is externally managed\n╰─> To install Python packages system-wide, try 'pacman -S\n    python-xyz', where xyz is the package you are trying to\n    install.\n    \n    If you wish to install a non-Arch-packaged Python package,\n    create a virtual environment using 'python -m venv path/to/venv'.\n    Then use path/to/venv/bin/python and path/to/venv/bin/pip.\n    \n    If you wish to install a non-Arch packaged Python application,\n    it may be easiest to use 'pipx install xyz', which will manage a\n    virtual environment for you. Make sure you have python-pipx\n    installed via pacman.\n\nnote: 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.\nhint: See PEP 668 for the detailed specification.\n"}

Overview

This error is due to the fact Archlinux honors PEP668 and now installing Python packages using python3 -m pip install x.y.z is not working anymore.

This change uses python-pipx as suggested by ArchLinux itself.

@palazzem palazzem self-assigned this Jun 14, 2023
@palazzem palazzem merged commit 7909a6f into main Jun 14, 2023
@palazzem palazzem deleted the palazzem/fix-python-bin branch June 14, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant