Python Forum
after py2 EOL, is it safe to repoint python?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
after py2 EOL, is it safe to repoint python?
#1
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?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
2.0 beta 26-sept-2000
2.0 release candidate 9-Oct-2000
2.0 final release 16-Oct-2000
Reply
#3
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.
Reply
#4
(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?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#5
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.
Reply
#6
+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.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#7
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)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  make eval() safe Skaperen 5 2,615 Mar-24-2022, 05:47 PM
Last Post: Skaperen
  is this string shell quote safe? Skaperen 2 2,094 Feb-18-2020, 12:56 AM
Last Post: Skaperen
  safe text to html Skaperen 10 11,539 Jul-07-2017, 04:23 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020