Skip to content

Instantly share code, notes, and snippets.

@wjladams
Last active November 22, 2022 18:13
Show Gist options
  • Save wjladams/71c03cf11f299694dce8e9eebed5ef4b to your computer and use it in GitHub Desktop.
Save wjladams/71c03cf11f299694dce8e9eebed5ef4b to your computer and use it in GitHub Desktop.
Jupyter on mac run as a launchd service

Steps

  1. Save com.bill.jupyter.plist to ~/Library/LaunchAgents
  2. Edit the file and replace USERNAME with your username
  3. In a terminal in the ~/Library/LaunchAgents directory run launchctl load com.bill.jupyter.plist

And that should do it, it is setup as Login launch item

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.bill.jupyter</string>
<key>ProgramArguments</key>
<array>
<string>/Users/USERNAME/anaconda3/bin/jupyter-notebook</string>
<string>--notebook-dir</string>
<string>/Users/USERNAME</string>
<string>--no-browser</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/Users/USERNAME/Library/LaunchAgents/jupyter-notebook.stderr</string>
<key>StandardOutPath</key>
<string>/Users/USERNAME/Library/LaunchAgents/jupyter-notebook.stdout</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment