Ability to select a package installed with suffix as default installation
See original GitHub issueHow would this feature be useful? Binaries from packages installed with a suffix currently also end with the same suffix. This makes it impossible to use them together with existing scripts and is cumbersome to use. These issues could be alleviated by installing the binaries without a suffix. To work around the name clashes, an additional command is added with which one can quickly switch between installed packages and their suffixes.
Describe the solution you’d like
I have started a proof of concept here: https://github.com/ctbur/pipx/compare/master...command-select
With pipx select you can choose which installed suffix is used as the default.
Example:
pipx install pre-commit==2.4 --suffix _2_4
pipx install pre-commit==2.5 --suffix _2_5
pipx select pre-commit_2_4
pre-commit --version # will show version 2.4
pipx select pre-commit_2_5
pre-commit --version # will show version 2.5
Please let me know if that is something that you would like to add to pipx, too. If so, I will expand on the proof of concept and add documentation, tests, autocomplete, a changelog entry and proper commit message.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (10 by maintainers)

Top Related StackOverflow Question
IMO, this seems a worthwhile benefit to functionality and not too much extra complexity as far as I can tell.
Before working on it more I would wait for #498 to land, it cleans up a bunch of code related to suffixes.
Yes, Windows would be a problem. I put symlink in quotes because we likely should implement something that mimics the symlink functionality instead of using
os.symlinkdirectly. We could e.g. create a file in place of an actual venv that contains tracking metadata, or create a directory that contains just metadata as you said.