You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I find I have to invoke reinstall-all after each Python update (#633). When I do, I see that pipx fails to reinstall with the error:
⛔ Error, the python executable would be deleted! Change it using the --python option or PIPX_DEFAULT_PYTHON environment variable.
...
The following package(s) failed to reinstall: pipx
This issue happened a few weeks ago and again today when I upgraded to Python 3.11.3 (using homebrew on macOS ARM).
Side note: I'm forced to pipx reinstall xonsh as that's the application that stops working after a Python upgrade. I notice that pipx still runs, and I didn't keep track of what happens to the other pipx-installed applications after the Python upgrade.
Pipx should be able to reinstall itself, at least on non-Windows machines. Or if it's not possible for some technical reason, it should account for this edge case and direct the user with some way to reinstall it.
I see there is guidance about "Change the [python executable]", but I have no idea what I'd change it to, as I've never specified it before.
I've installed pipx using:
pip-run pipx -- -m pipx install pipx
Where pip-run resolves to the Python 3.11 bin directory where it's installed.
I can use pip-run to side-load pipx and use that to reinstall pipx:
$ pip-run pipx -- -m pipx reinstall pipx
uninstalled pipx! ✨ 🌟 ✨
installed package pipx 1.2.0, installed using Python 3.11.3
These apps are now globally available
- pipx
done! ✨ 🌟 ✨
The text was updated successfully, but these errors were encountered:
While revisiting #633, I observed that setting PIP_DEFAULT_PYTHON (#633 (comment)) appears to work around this issue too. After setting it to $(which python3), the error goes away and pipx reinstall-all now works without error.
Is that the best recommendation? If so, should pipx be advertising this setting as a recommended one for all users?
Describe the bug
I find I have to invoke
reinstall-all
after each Python update (#633). When I do, I see that pipx fails to reinstall with the error:This issue happened a few weeks ago and again today when I upgraded to Python 3.11.3 (using homebrew on macOS ARM).
Side note: I'm forced to
pipx reinstall xonsh
as that's the application that stops working after a Python upgrade. I notice that pipx still runs, and I didn't keep track of what happens to the other pipx-installed applications after the Python upgrade.How to reproduce
I reproduced that over and over.
Expected behavior
Pipx should be able to reinstall itself, at least on non-Windows machines. Or if it's not possible for some technical reason, it should account for this edge case and direct the user with some way to reinstall it.
I see there is guidance about "Change the [python executable]", but I have no idea what I'd change it to, as I've never specified it before.
I've installed pipx using:
Where
pip-run
resolves to the Python 3.11 bin directory where it's installed.I can use pip-run to side-load pipx and use that to reinstall pipx:
The text was updated successfully, but these errors were encountered: