Python Forum
Running latest Python version on the Terminal (MAC)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running latest Python version on the Terminal (MAC)
#1
Hi all,

on my Terminal on Mac I've got Python 2.7.16.

(I had an issue: if I do 5 / 2 on Python 2.7.16 it returns 2 while Python on Repl returns 2.5)

I'd like to update it to the latest version and therefore solve this issue.

So, I downloaded the latest version.

I followed the installation process and everything was smooth.

But when I run "python" again on the Terminal I still see Python 2.7.16.

How can I run the latest Python version on my Terminal?
Reply
#2
Try to run "python3". Does that work?
Reply
#3
Amazing, it works :)

I was running "python" on the Terminal.

If I run "python3" it works.

Thanks a lot :)
Reply
#4
Also look at The right and wrong way to set Python 3 as default on a Mac
Reply
#5
Cool, sure I'll have a look

Thank you very much :)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  run part of a script with a different version of Python jdog 2 395 Jan-09-2024, 08:49 PM
Last Post: jdog
  How to find out from outside Python (in Windows) the current version of Python? pstein 4 680 Oct-04-2023, 10:01 AM
Last Post: snippsat
  invoking python in Terminal Euler 2 591 Aug-25-2023, 06:17 AM
Last Post: perfringo
  How to resolve version conflicts in Python? taeefnajib 0 873 Apr-27-2023, 08:37 PM
Last Post: taeefnajib
  Python venv and PIP version issue JanOlvegg 2 1,199 Feb-22-2023, 02:22 AM
Last Post: JanOlvegg
  Launch Python IDLE Shell from terminal Pavel_47 5 1,143 Feb-17-2023, 02:53 PM
Last Post: Pavel_47
  Python Version upgrade nitinkukreja 1 854 Feb-04-2023, 10:27 PM
Last Post: Larz60+
  Python VS Code: using print command twice but not getting output from terminal kdx264 4 1,034 Jan-16-2023, 07:38 PM
Last Post: Skaperen
  Can't update new python version on Pycharm GOKUUUU 6 3,707 Jul-23-2022, 09:24 PM
Last Post: GOKUUUU
  Building python (3.9.5) with different libexpat version (2.4.6) raghupcr 0 1,258 Feb-25-2022, 11:29 AM
Last Post: raghupcr

Forum Jump:

User Panel Messages

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