Contents
Getting started
Python 3.8
We will use python 3.8. Support for python2 has been stopped. No new bug reports, fixes, or changes will be made to Python 2. In python 3.9 is in its beta testing phase
Choosing the OS
Windows
Get the Source file from https://www.python.org/downloads/release/python-380/ .
Run the downloaded file python-3.8.x. Before clicking Install Now, check Add Python 3.8 to Path option. This will help OS find the path to python interpreter.
To make sure the path is updated go to This PC->System Properties->Advanced System Settings (Advanced Tab)->Environment variables and make sure Path is added and is pointing to the python interpreter.
Ubuntu (or any other debian based OS)
Ubuntu has its own package manage, aptitude. You can install python from apt. You will need sudo to let apt to download and install any packages. So, make sure you are a super user. Most of the Linux operating systems come pre installed with Python. To make sure python is installed and you have the correct version run the following command
# returns which python interpreter is used
$ which python3
# check the python version
$ python3 --version
If your python is not 3.8.x run the following commands
# download latest package information from all configured sources
$ sudo apt update
# download and install dependencies for python
$ sudo apt -y install software-properties-common build-essential libssl-dev libffi-dev python3-dev python3-pip python3-venv
MacOs
First install homebrew on Mac which allows you to install any Linux package on mac. Then install python using brew
# Run this to install homebrew
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# To install python using brew run the following command
$ brew install python3
Confirming python3.8 is installed
Open a terminal and type the following commands to confirm python is installed, check which one works for you. If everything went right you must be able to open a python interpreter
# 1.
$ python
# 2.
$ python3
Use exit function to exit from the python interpreter
>>> exit()