The Windows 8.1 PC I’m working on has several Pythons installed in different locations (as indicated by py -0p
). Most of them are to be considered unreliable: their versions are changed, they get deleted, configured and added. One of the Pythons is mine, and I’d like to set it’s location as the default on the PC without prohibiting access to other Pythons.
At least, I’d like for py
to launch Python from the specific location regardless of versions and other Pythons.
Troubles with the tools I’ve found:
- changing
PATH
doesn’t affect thepy
command - py.ini (as far as I’m aware) only allows version selection and not path selection
- the same goes for
PY_PYTHON
- deleting other Pythons will solve the problem only temporarily (and also be very rude)
- shebang doesn’t change the default version and may lead to an unreliable Python
- venv seems to be clunky: I would like to use python with minimal setup each time