THE FOUNDER’S GUIDE:

How to Install the Jupyter Notebook Server on Mac

The condensed tutorial with copy and paste code and screenshots

David Littlefield
6 min readFeb 12, 2021
Image by Vita Vilcina

“The expanded version of this article uses concise explanations to help you learn what’s happening 💡”

Open Terminal:

  1. Press “Command ⌘ + Spacebar”
  2. Enter “Terminal”
  3. Press “Return”

Install Jupyter Notebook:

  1. Copy the command from below these instructions
  2. Terminal
  3. Press “Return”
python -m pip install jupyter

Install the WebSocket Extension:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
python -m pip install jupyter_http_over_ws

Create the Configuration File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
jupyter notebook --generate-config

Open the Jupyter Directory:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
cd $HOME\.jupyter

Create the SSL Certificate:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Enter”
  4. Enter “US” into “Country Name”
  5. Press “Enter”
  6. Enter “.” into the remaining fields
  7. Press “Enter”
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem

Create the JSON File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
echo "" >> jupyter_notebook_config.json

Open the JSON File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
open -a textedit jupyter_notebook_config.json

Edit the JSON File:

  1. Copy the code from below these instructions
  2. Paste the code into TextEdit
  3. Change “Admin” to the Mac username
  4. Click the “File” menu
  5. Click “Save”

Create the Password:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
jupyter notebook password

Open the Launch Agents Directory:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
cd $HOME/library/launchagents/

Check the Executable File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
  4. Write down the Jupyter Notebook path
which jupyter-notebook

Create the Plist File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
echo “” > com.jupyter.notebook.plist

Open the Plist File:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
open -a textedit com.jupyter.notebook.plist

Edit the Plist File:

  1. Copy the code from below these instructions
  2. Paste the code into TextEdit
  3. Change “Admin” to the Mac username
  4. Replace the Jupyter Notebook path
  5. Click the “File” menu
  6. Click “Save”

Log into the Router:

  1. Open the web browser
  2. Copy the router IP address from below these instructions
  3. Paste the router IP address into the web browser
  4. Press “Enter”
  5. Log into the router
192.168.0.1

Set up Port Forwarding:

  1. Find the “Port Forwarding” page
  2. Paste the IPv4 address into the “Enter IP Address” text field
  3. Copy the port from below these instructions
  4. Paste the port into the “WAN Starting Port” text field
  5. Paste the port into the “WAN Ending Port” text field
  6. Select “All IP Addresses”
  7. Click “Apply”
8886

Get the Private IP Address:

  1. Copy the command from below these instructions
  2. Paste the command into Terminal
  3. Press “Return”
  4. Write down the private IP address
ipconfig getifaddr en0

Get the DNS Servers:

  1. Click the “Apple” menu
  2. Click “System Preferences”
  3. Click “Network”
  4. Click “Advanced”
  5. Click “DNS”
  6. Write down the DNS IP addresses

Set the Static IP Address:

  1. Click the “TCP/IP” tab
  2. Set “Configure IPv4” to “Manually”
  3. Enter the private IP address from earlier

Set the DNS Servers:

  1. Click the “DNS” tab
  2. Click the “+” button in DNS Servers
  3. Enter the DNS IP addresses from earlier
  4. Click “OK”
  5. Click “Apply”

Access the Server From the Local Network:

  1. Log into a different computer or laptop
  2. Connect to the same WiFi network
  3. Enter the IPv4 Address into the web browser
  4. Prepend “https://” to the IP address
  5. Append “8886” to the IP address
  6. Press “Enter”
  7. Type “thisisunsafe”
  8. Enter the password
  9. Click “Log In”

Get the Public IP Address:

  1. Copy the URL from below these instructions
  2. Paste the URL into the web browser
  3. Write down the public IP address
https://www.google.com/search?q=whatsmyip

Access the Server From a Remote Network:

  1. Log into a different computer or laptop
  2. Connect to a different WiFi network
  3. Enter the public IP address into the web browser
  4. Prepend “https://” to the IP address
  5. Append “8886” to the IP address
  6. Press “Enter”
  7. Type “thisisunsafe”
  8. Enter the password
  9. Click “Log In”

“Hopefully, this article helped you get the 👯‍♀️🏆👯‍♀️, remember to subscribe to get more content 🏅”

Next Steps:

This article is part of a mini-series that helps readers set up everything they need to start learning about artificial intelligence, machine learning, deep learning, and or data science. It includes articles that contain instructions with copy and paste code and screenshots to help readers get the outcome as soon as possible. It also includes articles that contain instructions with explanations and screenshots to help readers learn about what’s happening.

Linux:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine Learning
WSL2:
01. Install Windows Subsystem for Linux 2
02. Install and Manage Multiple Python Versions
03. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
04. Install the Jupyter Notebook Server
05. Install Virtual Environments in Jupyter Notebook
06. Install the Python Environment for AI and Machine Learning
07. Install Ubuntu Desktop With a Graphical User Interface (Bonus)
Windows 10:
01. Install and Manage Multiple Python Versions
02. Install the NVIDIA CUDA Driver, Toolkit, cuDNN, and TensorRT
03. Install the Jupyter Notebook Server
04. Install Virtual Environments in Jupyter Notebook
05. Install the Python Environment for AI and Machine Learning
Mac:
01. Install and Manage Multiple Python Versions
02. Install the Jupyter Notebook Server
03. Install Virtual Environments in Jupyter Notebook
04. Install the Python Environment for AI and Machine Learning

--

--

David Littlefield
David Littlefield

Written by David Littlefield

From: Non-Technical | To: Technical Founder | Writes: To Make It Easier For Everyone | Topics: #Startups #How-To #Coding #AI #Machine Learning #Deep Learning

No responses yet