-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Rework how packages install on EXTERNALLY-MANAGED
environment
#65
Conversation
I tried the current v3.0.3 as well as this PR on Debian 12. In both cases, I'm getting "error: externally-managed-environment" during TASK [geerlingguy.pip : Ensure pip_install_packages are installed.] |
That's what I get in the output. Could it be, that the EXTERNALLY-MANAGED get's restored during "Ensure Pip is installed."?
|
@gesinn-it-gea yes and no... I mean... On a fresh Ubuntu 24.04 removing
Showing
we can see |
Renamed handler from Remove EXTERNALLY-MANAGED to Ensure EXTERNALLY-MANAGED Always notify Ensure EXTERNALLY-MANAGED Refactor handlers into task Fix typo
3307035
to
31ba229
Compare
Totally agree on this, but removing the |
pip_externally_managed
EXTERNALLY-MANAGED
environment
Some nice investigations! Btw, you can also run it currently like this if you're fine with adding some extra_args to all the packages that you want to install: pip_install_packages:
- name: some-package
extra_args: --break-system-packages |
There is a problem in this case, that looks like pip3 does't support that
|
Closing this due to complications with multiple different Python versions specifically the old Ansible and Python that doesn't support 'break-system-packages' flags. Currently I've made an alternative role to test the implementation here https://github.com/socheatsok78-lab/ansible-role-unsafe-pip. |
Add ability to control how "EXTERNALLY-MANAGED" python base environment via flagpip_externally_managed
(boolean).Ifpip_externally_managed: true
, we preserver or create theEXTERNALLY-MANAGED
file in it intended place. Otherwise remove it as original impl.I'm not entirely sure if it is the right way to do this, but i'm open to suggestion.
Ref #57 (comment)