This guide will help you set up Python 3.10 and JupyterLab on your local machine using Miniconda. Weβll also install core data science libraries.
Step 0: Opening a Terminal
Before we begin, youβll need to know how to open a terminal (command-line interface) on your operating system:
For Windows:
- Press the Windows key + R to open the Run dialog.
- Type
cmd
and press Enter. Alternatively, search for βCommand Promptβ in the Start menu.
For macOS:
- Press Command + Space to open Spotlight Search.
- Type βTerminalβ and press Enter. Alternatively, go to Applications > Utilities > Terminal.
For Linux:
- Most Linux distributions use Ctrl + Alt + T as a keyboard shortcut to open the terminal.
- You can also search for βTerminalβ in your distributionβs application menu.
Step 1: Download and Install Miniconda
For Windows:
- Download the Miniconda installer for Windows from the official website.
- Run the installer and follow the prompts.
- During installation, make sure to add Miniconda to your PATH environment variable when prompted.
For macOS:
Download the Miniconda installer for macOS from the official website.
Open Terminal and navigate to the directory containing the downloaded file.
Run the following command:
bash Miniconda3-latest-MacOSX-x86_64.sh
Follow the prompts and accept the license agreement.
For Linux:
Download the Miniconda installer for Linux from the official website.
Open a terminal and navigate to the directory containing the downloaded file.
Run the following command:
bash Miniconda3-latest-Linux-x86_64.sh
Follow the prompts and accept the license agreement.
Step 2: Set up Python 3.10 and Core Libraries
Open a new terminal or command prompt window to ensure the Miniconda installation is recognized.
Run the following commands:
conda install python=3.10
conda install jupyter jupyterlab numpy pandas matplotlib seaborn
This will install Python 3.10, JupyterLab, and the core data science libraries in your base environment.
Step 3: Verify Installation
To verify that Python 3.10 is installed, run:
python --version
To launch JupyterLab, run:
jupyter lab
This should open JupyterLab in your default web browser. You can now create new notebooks and start coding!
Additional Notes
To update Miniconda and installed packages in the future, use:
conda update --all
While weβre using the base environment for this quick setup, itβs generally a good practice to create separate environments for different projects. You can explore this concept later as you become more familiar with conda.