Python is already installed on MAC and Linux machines. To overcome the issue of outdated and/or multiple versions of python, we will use anaconda to install python version 3.x, and to run jupyter notebooks (explained later).
- visit https://www.anaconda.com/distribution/
- on the middle of the page click on macOS
- download "Python 3.7 version".
- follow the instructions on either of these pages: https://www.datacamp.com/community/tutorials/installing-anaconda-mac-os-x or https://docs.anaconda.com/anaconda/install/mac-os/
- visit https://www.anaconda.com/distribution/
- on the middle of the page click on Windows
- download "Python 3.7 version" 32-bit or 64-bit.
- follow the instruction on the page https://docs.anaconda.com/anaconda/install/windows/
- visit https://www.anaconda.com/distribution/
- on the middle of the page click on Linux
- download "Python 3.7 version".
- follow the instruction on this page https://docs.anaconda.com/anaconda/install/linux/ General details of how to install Anaconda, can be found here https://docs.anaconda.com/anaconda/install/
Open Anaconda navigation to check the tools that it provides: https://docs.anaconda.com/anaconda/navigator/ One of those tools is jupyter notebook that will be used to run python code. Please check the user guide for more details: https://docs.anaconda.com/anaconda/user-guide/
Jupyter notebook is a web application to create and share documents. A notebook document can contain code, text, equations and/or visualizations. You can use jupyter notebook to write, execute and document python code. Though there are multiple ways to install and run jupyter notebook, Anaconda is the preferred way to run jupyter. After installing anaconda (version 3.x), you can follow the steps below to start jupyter notebook.
A good resource to familiarize yourself with Jupyter Notebook: How to Use Jupyter Notebook in 2020: A Beginner’s Tutorial
- navigate to http://docs.anaconda.com/anaconda/user-guide/getting-started/
- open Anaconda navigation (based on your OS)
- follow "Run Python in a Jupyter Notebook" section (in the middle of the page) to start your first notebook.
- you can check the anaconda navigation on https://docs.anaconda.com/anaconda/navigator/
If you like to start jupyter from the terminal instead of the instruction above:
- open a new terminal
- in the command line run "jupyter notebook"
- jupyter notebook will be opened in your default browser. If it did not, then using any browser navigate to http://localhost:8888
Windows users can start Jupyter Notebook by searching “Jupyter Notebook (anaconda)” in their Windows search bar. This action opens a terminal, which automatically opens the web based Jupyter Notebook application. I am not sure if this function is available for MAC and Linux.