pipx upgrade with a specificier

See original GitHub issue

How would this feature be useful?

Since 0.15 pipx got rid of the --spec argument, but now I can’t upgrade a package to a difference spec. Previously I could

pipx install virtualenv

# Some time later…
pipx upgrade virtualenv --spec "virtualenv>=30.0b2"
pipx upgrade virtualenv --spec "git+https://github.com/pypa/virtualenv.git"

Describe the solution you’d like

Either add back the --spec argument for upgrade, or allow e.g.

# Current fails with "Package cannot be a url"
pipx upgrade "git+https://github.com/pypa/virtualenv.git"

# Current fails with "FileNotFoundError"
pipx upgrade "virtualenv>=30.0b2"

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
itsayellowcommented, Feb 6, 2020

Just to check, will the workaround work: pipx uninstall followed by pipx install ? Or is there a reason (besides extra typing) that that’s worse?

0reactions
pohltcommented, Jun 17, 2021

While uninstall and install in principle do the job, it might take quite some time if you have many large dependencies. I would prefer to reuse as much as possible from the existing installation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipx upgrade with a specificier · Issue #356 - GitHub
I'd assume upgrade to keep injected packages. reinstall makes sense as well. All reactions.
Read more >
Docs - pipx
execute binaries from Python packages in isolated environments.
Read more >
Changelog - pipx - GitHub Pages
Fixed pipx install to provide return code 0 if venv already exists, similar to pip's behavior. (#736); [docs] Update ansible's install command in...
Read more >
pipx — Install and Run Python Applications in Isolated ...
Upgrade pipx with brew update && brew upgrade pipx . On Linux, install via pip (requires pip 19.0 or later). python3 -m pip...
Read more >
community.general.pipx module - Ansible Documentation
community.general.pipx module – Manages applications installed with pipx ... Upgrade the injected packages along with the application.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found