Python QuickStart

Programming

We explain how to install and initially set up Python on Linux or Windows.

Sponsored Links

Python Installation

Linux (Ubuntu)

  • To download and install Python, follow the steps below.
    • Below is an example of Ubuntu. Use “yum” for RHEL or CentOS.
    • Note that this requires root privileges.
# apt update
# apt-get install python3
  • To check installation completion, follow the steps below.
    • Python3 command is “python3” on Mac / Linux.
    • If the following display is output, there is no problem.
# python3
Python 3.X.X (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
  • To calculate by Python and output the result, follow the steps below.
    • The correct calculation result is displayed as follows.
>>> print(4/3)
1.3333333333333333
  • Exit Python interactive mode.
>>> exit()

Windows

Python Install

Source : Python.org

  • Click “Windows” on the “Downloads” tab.

Python Install

Source : Python.org

  • If you install Windows OS 64bit, Click “Download Windows x86-64 web-based installer” from your desired Python version and download “python-3.X.X-amd64-webinstall.exe”.

Python Install

Source : Python Releases for Windows | Python.org

  • Double-click the downloaded installer “python-3.X.X-amd64-webinstall.exe”.
  • Check the option “Add Python 3. ~ to Path” at the bottom of the installer and click “Install Now”.
    • If necessary, check the option “Install launcher for all users (recommended)”.
Python Install
  • If the installer displays “Setup was successful”, the installation is complete. Click “Close”.
Python Install
  • To confirm installation completion using PowerShell or CommandPrompt, follow the steps below.
    • Python3 command is “python” on Windows.
    • If the following display is output, there is no problem.
# python
Python 3.X.X (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
  • To calculate by Python and output the result, follow the steps below.
    • The correct calculation result is displayed as follows
>>> print(4/3)
1.3333333333333333
  • Exit Python interactive mode.
>>> exit()

The environment is now ready.
If you want to start Python programming using this environment, refer to the knowledge below.

Sponsored Links