Python Forum

Full Version: after py2 EOL, is it safe to repoint python?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
after python2's EOL, is it "safe" to change the plain "python" command to point to or run python3? anyone know when it was changed from python1 to python2?
2.0 beta 26-sept-2000
2.0 release candidate 9-Oct-2000
2.0 final release 16-Oct-2000
Skaperen Wrote:is it "safe" to change the plain "python" command to point to or run python3?
It probably depends on your OS. I wouldn't change the "python" command in a Linux OS where the default python is python 2. Instead, upgrade the OS to a version where the python command points to python 3.
(Sep-13-2019, 06:31 AM)Larz60+ Wrote: [ -> ]2.0 beta 26-sept-2000
2.0 release candidate 9-Oct-2000
2.0 final release 16-Oct-2000

when did the "python" command get changed to point to python2?


(Sep-13-2019, 07:37 AM)Gribouillis Wrote: [ -> ]
Skaperen Wrote:is it "safe" to change the plain "python" command to point to or run python3?
It probably depends on your OS. I wouldn't change the "python" command in a Linux OS where the default python is python 2. Instead, upgrade the OS to a version where the python command points to python 3.

if one installs python3 from a source build, does that change the "python" command if it already exists? so, i should treat it as the decision of the OS/distro builder (because their stuff may expect it to be that way) and i should just look at the next version of my OS/distro?
Skaperen Wrote:if one installs python3 from a source build, does that change the "python" command if it already exists?
You could experiment with this in a virtualbox instance.
+1 for leaving it on OS.

As you know half of the system runs on Perl and Python scripts. Changing the default python command to point to a different version could cause a mess.
For me python and pip always point to version choose as global(system wide).
Because i always use pyenv Simple Python Version Management.
snippsat Wrote:Why pyenv?
  • pyenv will install Python or other Distribution(Anaconda,PyPy,MicroPython...ect),set it as system wide installation(or run it in a shell seesion).
  • No more using python3 or pip3 or sudo or --user when pip install something.
  • It's always python and pip to version set as global,and pip install requests to global version.
  • It's safe and will not mess with your OS,can go back to default pyenv local system or remove all rm -rf $(pyenv root)