Skip to content
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

Newer versions of package may be ignored silently if the Python version used by pipx is incorrect #890

Open
taranlu-houzz opened this issue Sep 2, 2022 · 1 comment
Labels
docs enhancement New feature or request help wanted Extra attention is needed

Comments

@taranlu-houzz
Copy link

Describe the bug
When installing a package, by default pipx choses the latest version that is compatible with the version of Python that it uses. This typically works since newer versions of a package would usually use newer versions of Python, but if a package changes its required version of Python to be an earlier version, this can lead to confusing situations where pipx will chose an older version of the package. This isn't exactly a bug, but seems like maybe adding some kind of warning could be helpful (or maybe just a note in the documentation).

How to reproduce

  • Create package using a newer version of Python (e.g. 3.10.2 the pipx default Python in my case).
  • Upload the package to a private pypi repo.
  • Change the requirements of the package to an earlier version of Python, >=3.7, <3.8 in my case, and push that up to the pypi repo as a prerelease version.
  • Attempting to install the new prerelease package with: pipx install my_package --pip-args="--index-url=<private pypi index> --trusted-host=<private pypi host> --pre" installs the last compatible version of the package for the default pipx Python.
  • In order to correctly install the new prerelease package, you have to use: pipx install my_package --pip-args="--index-url=<private pypi index> --trusted-host=<private pypi host> --pre" --python <path to appropriate Python version>

Expected behavior
Would be nice to have a warning about this or maybe a note in the docs.

@gaborbernat
Copy link
Contributor

PR welcome.

@gaborbernat gaborbernat added enhancement New feature or request help wanted Extra attention is needed docs labels Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants