If you got a new Mac/Macbook or updated to macOS Sonoma, and you want to install Jupyter Notebook locally on your Mac then you can follow the below steps.
Step 1: Make sure Python 3.x is installed on your Mac
Run the below command to see if Python 3.x is installed on your Mac by trying the --version command.
% python --version
Python 3.9.6
If you get an error, that python is not found, then makes sure to install it first.
% python --version
zsh: command not found: python
Also, make sure the pip3 command works.
% pip3 --version
pip 21.2.4 from /Library/Developer/CommandLineTools/Library/Frameworks/
Python3.framework/Versions/3.9/lib/python3.9/site-packages/pip (python 3.9)
Step 2: Install Notebook using pip3 command
Macbook % pip3 install jupyter
Defaulting to user installation because normal site-packages is not writeable
Collecting jupyter
Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB)
..
..
Step 3: Run Notebook using python3 command
% python3 -m notebook
...
[I 2023-09-28 17:03:15.573 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-09-28 17:03:15.574 ServerApp] notebook | extension was successfully loaded.
[I 2023-09-28 17:03:15.575 ServerApp] Serving notebooks from local directory: /Users/code2care
[I 2023-09-28 17:03:15.575 ServerApp] Jupyter Server 2.7.3 is running at:
[I 2023-09-28 17:03:15.575 ServerApp] http://localhost:8888/tree?token=99a42be453b83ce732f15ea836f8017b8f297fad75bb678d
[I 2023-09-28 17:03:15.575 ServerApp] http://127.0.0.1:8888/tree?token=99a42be453b83ce732f15ea836f8017b8f297fad75bb678d
[I 2023-09-28 17:03:15.575 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
![Installing and Running Jupyter Notebook on macOS Sonoma Installing and Running Jupyter Notebook on macOS Sonoma](https://code2care.org/macos/install-jupyter-notebook-on-macos-sonoma/images/Installing and Running Jupyter Notebook on macOS Sonoma.jpg)
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to MacOS,
- Fix: grunt: command not found (Mac/Windows)
- AppleScript Example with TextEdit
- How to copy Password of Wifi on your Mac
- Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2)
- How to check if a port is in use using terminal [Linux or macOS]
- Cut, Copy and Paste Keyboard Shortcuts on Mac Keyboard
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to Remove Widgets from macOS Sonoma 14 Desktop
- Turn off Auto-Capitalization on macOS Ventura 13
- How to Go To /usr/local/bin on Mac Terminal?
- How to Open TextEdit on Mac
- Mac: How to Open Android Studio from Terminal
- How to change the default location of Mac Screenshot
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- How to install homebrew (brew) on M1 Mac
- Must Know Homebrew Commands for Mac/Linux Users
- Steps to Uninstall Roblox on Mac (macOS)
- How to change the System Settings Sidebar icon size Mac Ventura 13
- How to set Out Of Office (OOO) on Outlook for Mac [Updated 2023]
- Trigger Notification Center Message using Mac Terminal Command
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools
- How to Install Rust Language on Mac (macOS)
- How to minimize all Windows in Mac
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- How to make TextEdit the default text Editor on Mac
More Posts:
- How to uninstall Visual Studio Code on macOS - MacOS
- How to Copy all text to Clipboard in Vim - vi
- Check if a Java String is Numeric or Alphanumeric - Java
- Steps to Install Java 21 (LTS JDK) on Windows 11 - Java-JDK-21
- 9 Ways to Loop Java Map (HashMap) with Code Examples - Java
- Closest Alternate to Notepad on Mac - MacOS
- How to docker remove a container when it exits - Docker
- Selenium Maven Dependency for pom.xml - Java