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

Installing pip package on Ubuntu224.04 is no longer available #60

Open
kissifrot opened this issue Sep 16, 2024 · 2 comments
Open

Installing pip package on Ubuntu224.04 is no longer available #60

kissifrot opened this issue Sep 16, 2024 · 2 comments

Comments

@kissifrot
Copy link

Hello,

Since Ubuntu 24.04 (I'm not sure whether 22.04 had the issue), it's not possible to install the package using standard pip install anymore.

Now recommended method is using the python3-supervisor deb package on those systems, or use a virtual environment instead.

Would it be possible you add this support?

Copy link

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@github-actions github-actions bot added the stale label Jan 17, 2025
@Diegiwg
Copy link

Diegiwg commented Jan 18, 2025

Hi @kissifrot :)

The @geerlingguy has stated that he does not wish to address the Python Externally Managed Environment issue within the supervisor role and that the role requires PIP to have permission to manage packages to function correctly.

Considering this, an alternative I found is to pass the environment variable PIP_BREAK_SYSTEM_PACKAGES, which corresponds to the break-system-packages flag. This flag allows PIP to manage packages even on operating systems with such restrictive conditions.

Note 1: It is necessary to use import_role so that the environment variable can be passed to the tasks within the geerlingguy.supervisor role. This ensures that the task using PIP is configured with this environment variable, allowing PIP to bypass Python's Externally Managed mode.

Note 2: By using the environment variable, the role continues to work even on operating systems that do not have the Python Externally Managed mode enabled. So, no issues arise in these scenarios.

Working Example

ansible.builtin.import_role:
    name: geerlingguy.supervisor
environment:
    PIP_BREAK_SYSTEM_PACKAGES: "1"

@github-actions github-actions bot removed the stale label Jan 24, 2025
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

2 participants