Get started with Python on macOS Big Sur

2021/1/9 update: I noticed that the command Python3 was installed, and changed the description.


Status quo confirmation

I think Python is pre-installed on the iMac, so start a terminal and check the current status.

% which python
/usr/bin/python

There was a Python command. How do you use it?

% man python

PYTHON(1)                                                                                                                                                    PYTHON(1)

NAME
       python - an interpreted, interactive, object-oriented programming language

SYNOPSIS
       python [ -B ] [ -d ] [ -E ] [ -h ] [ -i ] [ -m module-name ]
              [ -O ] [ -OO ] [ -R ] [ -Q argument ] [ -s ] [ -S ] [ -t ] [ -u ]
              [ -v ] [ -V ] [ -W argument ] [ -x ] [ -3 ] [ -?  ]
              [ -c command | script | - ] [ arguments ]

It seems that you can check the version with the V option.

% python -V
Python 2.7.16

The installed Python looks like 2.7.16. Also take a look at the bin directory

% ls -l /usr/bin/python*
-rwxr-xr-x  1 root  wheel  137536  1  1  2020 /usr/bin/python3

There was a command called python3.

% man python3   
No manual entry for python3

There is no man.

% python3 -V
Python 3.8.2

There seems to be version 3.8.2. What is the latest version now? If you look at the bottom of python (1) with man, you can see some websites.

INTERNET RESOURCES
       Main website:  https://www.python.org/

Looking at Python's main website, it seems that version 3.8.7 will be released on December 21, 2020. Looking at Python's main website, is it big for Python version 2 and Python version 3? There seems to be a difference. There is also a porting guide from 2 series to 3 series, so it seems that it is probably a version upgrade with incompatibility of language specifications.

Now that we have confirmed the current situation, that's all for today. Next, I'll look for a reference book that meets the following requirements.

Recommended Posts

Get started with Python on macOS Big Sur
Get started with MicroPython (on macOS)
Install Python 3.8.6 on macOS Big Sur using pyenv
Get started with Python! ~ ② Grammar ~
Get started with Python! ~ ① Environment construction ~
Link to get started with python
How to get started with Python
Getting started with Python 3.8 on Windows
Get started with Python in Blender
Let's get started with Python ~ Building an environment on Windows 10 ~
Get Started with TopCoder in Python (2020 Edition)
How Python beginners get started with Python with Progete
Installing PIL with Python 3.x on macOS
[Blender x Python] Let's get started with Blender Python !!
Get started with the Python framework Django on Mac OS X
Django 1.11 started with Python3.6
Python hand play (let's get started with AtCoder?)
1.1 Getting Started with Python
Getting Started with Python
Get started with MicroPython
Get date with python
Install Python 3 on MacOS Catalina (with Homebrew only)
Get started with Mezzanine
Getting Started with Python
A layman wants to get started with Python
[Cloud102] # 1 Get Started with Python (Part 1 Python First Steps)
I tried to get started with blender python script_Part 01
I tried to get started with blender python script_Part 02
Get started with MicroPython (on macOS)
Get comments on youtube Live with [python] and [pytchat]!
Getting Started with Python Functions
Get started with Django! ~ Tutorial ⑤ ~
Get Twitter timeline with python
Get started with influxDB + Grafana
Get Youtube data with python
Getting Started with Python Django (1)
Made python available on macOS
Get started with Django! ~ Tutorial ④ ~
Getting Started with Python Django (4)
Getting Started with Python Django (3)
Get started with Django! ~ Tutorial ⑥ ~
Get thread ID with python
Getting Started with Python Django (6)
Get stock price with Python
Get home directory with python
Get keyboard events with python
IfcOpenShell python bindings get started
Python3 | Getting Started with numpy
Getting Started with Python Django (5)
Get Alembic information with Python
Use Python 3 introduced with command line tools on macOS Catalina
Minimum knowledge to get started with the Python logging module
IP spoof using tor on macOS and check with python
Getting Started with Python responder v2
Get reviews with python googlemap api
Getting Started with Python Web Applications
Getting Started with Python for PHPer-Classes
Get the weather with Python requests
Get web screen capture with python
[Python] Get economic data with DataReader
Getting Started with Python Basics of Python