Fixing a Jupyter Notebook Error From the Latest MacOS Update

Matthew Speck
2 min readMay 23, 2017

--

If you’re a Mac user, you likely updated your operating system recently to MacOS Sierra 10.12.5. The update promised to ‘improve the security, stability and compatibility of your Mac.’ Unfortunately, for many Jupyter Notebook users, it also caused a problem opening notebooks. After updating, this is the error that I and many other Jupyter Notebook users got:

“Execution error:…doesn’t understand the “open location” message.” Every time I tried to start a Jupyter Notebook, instead of the notebook opening in my browser, it instead gave me this message. Through some Googling, I was able to find that an issue had been raised on the Jupyter Github, and reading through it, I found the solution. Because scrolling through long threads is no fun, I’ll outline how anyone can fix this error below.

To start off, enter this code into your terminal; the directory you’re in does not matter:

nano ~/.jupyter/jupyter_notebook_config.py

If the above code does not work, it means that the jupyter_notebook_config.py file does not exist, so you’ll have to create it using this code — again, this code can be run in any directory:

jupyter notebook --generate-config

After running this, run the first command (nano ~/.jupyter/jupyter_notebook_config.py) again and it should work.

Now, your terminal should look something like this:

Hit control + W to open up the search bar and search for c.NotebookApp.browser = u’’:

Hitting enter will immediately take you to the line of code you’re looking for.

Now, simply un-comment the line by deleting the pound sign, and write ‘chrome’ between the two single quotes, as shown below:

To save and exit, press control + o and then control + x and you’re all set!

--

--

Matthew Speck

Teaching humans to learn machine learning @GA_DC | Washington Capitals fan | Fordham ‘16