Python Forum

Full Version: python3 vs python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
are we ever going to use the name "python" (without the "3") as an alias/equivalent for "python3" in the context of the name of the executable? or will this be left up to the platform builder?
Maybe it will eventually happen, but will we still be alive when the time comes?

Python (2) will probably remain for some time for reasons of compatibility.
As example Ubuntu 20.04(21.04 Python 3.9) has Python 3.8.2 as the default version.
Python 2.7 has been moved to universe and is not included by default in any new installs.
So there is no Python 2.7,still have to use python3,i guess they could just change to just python as there is no 2 version anymore.

I usually always use pyenv there then there is only python and pip to version set as global.
There is no python3 or pip3 use with pyenv.
# Set as system wide version
tom@tom:~$ pyenv global 3.9.5

# Test
tom@tom:~$ python -V
Python 3.9.5
(Jul-28-2021, 01:12 AM)Skaperen Wrote: [ -> ]are we ever going to use the name "python" (without the "3")

Use a modern distribution.

On Arch Linux it's already a standard.
/usr/bin/python points to /usr/bin/python3 which points to the current release.
To use python2, you've to type explicit python2. I have it still installed because of some dependencies.
But there are lesser and lesser packages/modules, which supports Python2.

Or use the suggested pyenv.
In my kubuntu 20.04 I was able to do
Output:
sudo apt install python-is-python3
and it fixed the issue.