Pages

Jupyter Notebooks on MacOS

run cell: cmd+enter

change to code: y

change to markdown: m

shell cmd: preceed code with ! symbol, like:

!pip3 install python-dotenv


  1. Install Python:
    • Open Terminal and install Homebrew if it is not already installed:
      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • Use Homebrew to install Python:
      brew install python
    • Verify the installation:
      python3 --version
  2. How to Install Anaconda on macOS:
  3. Use Anaconda app and select Jupyter Notebook.
    • Click on “Python [conda env: base]” – This will create a new Jupyter Notebook using the default Conda environment.
    • Once open, rename the file (File → Rename) to something meaningful.
    • Start coding – You can now type Python code in the first cell and run it.