Check for latest version before running with `pipx run`
See original GitHub issueHow would this feature be useful?
When using pipx run someapp, a version of someapp is cached for 14 days. There could be new releases within that timeframe that could be useful to have.
Describe the solution you’d like
I think my ideal solution would be to just automatically check for a newer version and upgrade if it exists. If you’re already on the latest version, use the cache.
The next best solution (which would avoid any backwards compatibility issues) would be pipx run --latest someapp, that would work the same way but require an explicit flag.
A third solution, that might work well with the second, is having some sort of config you can set (e.g. ~/.pipxrc) that lets you say you always want the --latest flag.
Describe alternatives you’ve considered
The only real workaround I’ve found is to run the app a second time without cache, then a third time with the cache. This also only works if you know the version has changed and want to force it to change. For example:
pipx run someapp --version # v0.1.0
# some new update comes out
pipx run --no-cache someapp --version # v0.1.1
pipx run someapp --version # v0.1.1
Some downsides:
- If the app has a lot of dependencies, running
--no-cacheevery time will be pretty inefficient. - If you don’t always run with
--no-cache, you need to know somehow if there’s a version update - If you want to update once with
--no-cache, it will delete the cache the first time and download the latest version, then the second time it’ll download it again but actually cache it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)

Top Related StackOverflow Question
The Simple API is HTML (PEP 503), and pip uses it as the primary package discovery API, so it’s extremely likely to be supported by any given repository implementation.
It looks like Artifactory does actually support the pypi Simple API, but not JSON. So if we went Simple all the way that could work… not sure how many other projects there are out there to support private repos and whether they also support the API. Looks like it’s XML so it’s not as easy to parse as JSON, but like @uranusjr said there are clients out there for that.