Setting Up Python & JupyterLab Environment
Introduction
Python and JupyterLab are powerful tools used for data analysis, scientific computing, and machine
learning. This guide provides step-by-step instructions for installing Python and JupyterLab on
Windows, Linux, and Mac.
Step-by-Step Guide
Linux:
Install Python:
sudo apt update
sudo apt install python3 python3-pip
Install Virtual Environment:
pip install virtualenv --break-system-packages
Create Virtual Env:
virtualenv summerofai
(or)
python3 -m venv summerofai
Activate Virtual Env:
source summerofai/bin/activate
Install JupyterLab:
pip3 install jupyterlab
Launch JupyterLab:
jupyter lab
A new tab will open in your default web browser with JupyterLab.
Windows:
Install python:
1. Download Python from python.org.
2. Run the installer and check the box to add Python to PATH.
3. Complete the installation process.
Install Virtual Environment:
pip install virtualenv
Create Virtual Env:
python -m venv summerofai
Activate Virtual Env:
summerofai\Scripts\activate
Install JupyterLab:
pip3 install jupyterlab
Launch JupyterLab:
jupyter lab
A new tab will open in your default web browser with JupyterLab.
Mac:
Install python:
Install Homebrew by running the following command:
/bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Once Homebrew is installed, you can install Python by running:
brew install python
Install Virtual Environment:
pip3 install virtualenv
Create Virtual Env:
virtualenv summerofai
Activate Virtual Env:
source summerofai/bin/activate
Install JupyterLab:
pip3 install jupyterlab
Launch JupyterLab:
jupyter lab
A new tab will open in your default web browser with JupyterLab.
Troubleshooting
• Command not found: Ensure Python and pip are installed and added to your system PATH.
• Permission issues: Try running commands with sudo on Linux and Mac if you encounter
permission errors.
• Browser doesn't open: Copy the URL provided in the terminal and paste it into your web
browser manually.