Python is a general purpose programming language with statistical routines. There are many ways of using Python, but here we cover the setup of two:
In addition we need the following packages installed into Python, also covered below:
Google Colab runs Python in your web browser — no installation needed.
Steps:
When running Python in Google Colab, the most common packages are already installed. If you need to install a missing package at some point, insert the following into a cell in the open Notebook:
!pip install package_name
The only package we need, which is not pre-installed in Google Colab, is pingouin:
!pip install pingouin
If you want to work offline or prefer a local setup, follow these steps:
Step 1: Install Python
Windows
macOS
Python 3 may already be installed. Check by opening Terminal and typing:
python3 --version
If needed, download and install from: https://www.python.org/downloads/
Linux (Ubuntu/Debian)
sudo apt update
sudo apt install python3 python3-pip
Step 2: Install VS Code
Step 3: Install VS Code Extensions
Open VS Code and:
Step 4: Install Packages (Local Python)
Open a terminal in VS Code (View → Terminal) or use your system terminal.
Install packages with:
pip install package_name
We need the following packages installed:
pip install numpy pandas scipy statsmodels pingouin matplotlib seaborn
Step 5: Run Jupyter Notebooks in VS Code
.ipynb
file in VS Code.