![]() ![]() ![]() Keeping your priority values low might mean the official implementation of this (if it happens) will be compatible. However, I've noticed that many other "alternatives" (notably editor) generally use multiples of 10 for official suggested versions. You can select different priorities that suit your needs. To manually select a system-wide version, use: sudo update-alternatives -config python Sudo update-alternatives -install $(which python) python $(readlink -f $(which python2)) 2īy default, the above will select the highest priority alternative automatically. To be nice, you should probably also add python2, at a lower priority: # Adds `python2` as the alternate for `python` with priority `2`. Sudo update-alternatives -install $(which python) python $(readlink -f $(which python3.8)) 3 You can also add any number of other alternatives for python: # Adds `python3.8` as the alternate for `python` with priority `3`. Sudo update-alternatives -install $(which python) python $(readlink -f $(which python3)) 3 On a fresh Raspberry Pi OS install, you just need one command: # Adds `python3` as the alternate for `python` with priority `3`. ![]() It seems we want to add our desired version of " alternatives" for the python binary. I won't go into why you probably shouldn't use an alias to run python, but will answer the more important titular question. I have not seen an "official" solution from Raspberry Pi Foundation on changing which version of Python is active. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |