pipx icon indicating copy to clipboard operation
pipx copied to clipboard

Add unified install/upgrade command

Open glensc opened this issue 4 years ago • 1 comments

How would this feature be useful?

When you install/upgrade pip, it has a unified command line:

python3 -m pip install --user -U foo

But for pipx, need to have different command, depending on if you want to upgrade or install:

pipx install foo
pipx upgrade foo

For the end user instructions, it would be convenient to have a single command that does install or upgrade to the latest version

Describe the solution you'd like

pipx install foo --upgrade
pipx install foo -U

Describe alternatives you've considered

Alternative instructions having two commands, is not that straight forward:

Consider this in the application readme:


To install latest application foo, run the following:

pipx install foo

# or

pipx upgrade foo

glensc avatar Sep 29 '21 05:09 glensc

It would be useful to be able to do pipx upgrade package==version instead of pipx install package==version --force

mattmess1221 avatar Oct 17 '21 19:10 mattmess1221

Working on an --upgrade option.

chrysle avatar Mar 01 '23 20:03 chrysle

@meowmeowmeowcat Can I base my work on the upgrade command or do you think that should be merged into install and removed completely?

chrysle avatar Mar 07 '23 14:03 chrysle

@meowmeowmeowcat Could you please point me into the right direction? I would like to have this decided before I do any unnecessary work.

chrysle avatar Mar 13 '23 21:03 chrysle

pipx upgrade should not be removed. IMO adding an option --upgrade to pipx install is enough.

dukecat0 avatar Mar 13 '23 23:03 dukecat0

Thanks for the feedback! Will finish as soon as I've figured out how to implement a test.

chrysle avatar Mar 14 '23 06:03 chrysle

https://github.com/pypa/pipx/pull/953#issuecomment-1834417543

gaborbernat avatar Dec 02 '23 17:12 gaborbernat