-
Notifications
You must be signed in to change notification settings - Fork 418
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
Make pipx more automation friendly, like pip #1562
Comments
Thanks for the feedback, I agree that some parts of the application can be improved to be more user-friendly. Here are some of the alternative solutions that I would recommend:
|
@dukecat0 Your first suggestion does solve one problem. The 2nd suggestion doesnt allow using My team manages/installs several python applications/packages for a fleet of hosts. We keep a tight boat by controlling which versions are installed via ansible group variables. The playbooks run automatically on each host every day to maintain a consistent fleet of hosts. Being able to specify versions allows us to revert a deployment in case an application has a bug on their release. Given my example, I would like to be able to upgrade |
Another issue I noticed is that This one is a known issue since 2023, #997 |
I am curious about this. I tried installing and/or upgrading my packages with threading in a custom python script so it can take less time, but I wasn't successful. I think this is due to the |
Ansible, which has a "pipx" module. https://docs.ansible.com/ansible/latest/collections/community/general/pipx_module.html |
For example this won't work with plain pipx and/or ansible: ---
- name: Install tox
community.general.pipx:
name: tox==1.0.0 Then running the same thing with |
Another issue that makes pipx not friendly is the fact it doesnt use System Certificates like pip does. This causes locally issued certs to not be trusted even though the System and Pip trust them. This has been extensively documented here #961 |
Describe the bug
I currently manage a fleet of hosts configured with
Ansible
, and we’ve recently encountered a new challenge with newer operating systems. We're now required (PEP 668
) to install applications globally for multiple users, which is wherepipx
comes in, using the--global
flag. Previously, we could set the version of a Python application as anAnsible
variable, and pip would handle the installation smoothly when the version changed. However, after migrating topipx
, this behavior has changed. Pipx won’t allow version updates unless the--force
flag is used, which isn't ideal.If our playbooks run daily, using
--force
becomes inefficient since it reinstalls the entire application every time. Pipx should ideally support version updates by automatically upgrading the app instead of simply stating that it’s already installed.The same happens with using
pipx inject
, there's no way to upgrade an injected app.How to reproduce
Example of simple
pipx
install, and changing version:Example
pipx inject
with issue:Now if i try using
pipx upgrade
, it doesn't support specifying a spec, and doesn't work at all:Expected behavior
Example pip install with a new version, works out of the box.
We have spent multiple days trying to figure out how to migrate our automated setup from
pip
topipx
. It shouldn't be this hard.tldr
spec
. Some commands take a version, some don't.Potential Solutions
--upgrade
param topipx install
that will use the spec to auto-upgrade the package. Similar to whatpip --upgrade <spec>
does.<spec>
topipx upgrade
.pipx inject --upgrade
, similar to point 1 on this list ofPotential Solutions
The text was updated successfully, but these errors were encountered: