setting up Jupyter Notebook on your local machine, especially tailored for MacOS users. If you’re navigating this on Windows, you might need to adapt some steps or do a bit more digging.
Step 1: Download and Install Anaconda
- Begin by visiting Anaconda’s official download page to get the installer. Select the MacOS version to proceed.
- Follow the installation process once the download is complete. The user interface will guide you through the steps, making it straightforward to set up.
Step 2: Configure Conda in Terminal
Open your terminal and type conda
, then press ENTER. If you see a list of commands, you’re on the right track. If not, we’ll need to make sure conda
is accessible.
Check for the conda
executable’s location, which is usually at ~/anaconda3/bin
. You can do this by navigating to your home directory (cd ~
) and listing its contents (ls
). If anaconda3
is visible, you’re good to go. If not, some additional steps may be required to locate it.
Set the path for conda
by using nano .bashrc
in the terminal, then add the line
export PATH=~/anaconda3/bin:$PATH
This ensures conda
commands can be run from anywhere in the terminal.
Enhance conda
with conda-forge, a community-driven collection of packages, by entering:
conda config --add channels conda-forge
conda config --set channel_priority strict
Step 3: Create and Activate a Conda Environment
Create a new environment with a name of your choice by running:
conda create -y -n my-env python=3.11
This sets up an isolated space with Python 3.11 for your projects.
Activate your new environment with
conda activate my-env
This switches to your newly created environment.
Start Jupyter Notebook by entering
jupyter notebook
in the terminal. This launches Jupyter Notebook, allowing you to begin working on your projects locally.
To run Jupyter Notebook in the future, simply activate your environment and run jupyter by entering this on terminal.
conda activate my-env
jupyter notebook
This guide aims to provide a clear and concise path to getting Jupyter Notebook up and running on your local machine, with an emphasis on simplicity and essential steps.
Leave a Reply