2021/1/9 update: I noticed that the command Python3 was installed, and changed the description.
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