LMuser+ wrote: ⤴Fri Dec 29, 2023 1:08 am
ISo apparently I can run my python scripts by typing python instead of python3?
Yes you can. But if you are writing scripts, you should start them with
#!/usr/bin/python3
.
The link
/usr/bin/python -> python3
is provided so that scripts written calling for
#!/usr/bin/python
at least get a python interpreter rather than a not found error message. They may not work though, depending on whether they rely on old python2 syntax or names.
It may be worth uninstalling package python-is-python3. If you do happen to find that some scripts still call for python, you could add the missing 3 to them, or reinstall python-is-python3. It really is just a transition convenience, and probably not needed any more.
EDIT:
Oh wow! I just checked on my PC, and I find that script
/usr/lib/linuxmint/mintMenu/pointerMonitor.py
still calls for /usr/lib/python. That's probably an oversight. Or maybe it's just a library imported by another python program that does call python3, so the #! line is never used.
Also, if you were to install ansible, there are 7444 scripts in /usr/lib/python3/dist-packages/ansible_collections/ that start with #!/usr/lib/python. But I suspect they are all libraries that get called by something else that has already chosen its correct python interpreter.