As usual in the terminal trying to launch jupyter
jupyter notebook
If you enter
Unable to recognize the "open location" message.(-1708)
The phenomenon that the error message is displayed for a while. You can deal with it by directly hitting the displayed URL, but other measures at the moment are summarized.
(Hereafter when using Chrome)
First, check the file (this step is not necessary, but just in case)
cd
And move to your home directory at the terminal
ls -al
If you check the files in your home directory including special files in
.bash_profile
There should be! So I'm going to add some code to this file.
Open the file with a suitable text editor and it's OK. Open Finder, in the folder of your home directory, Show hidden files using "command + shift +." Open ".bash_profile" using a text editor or the like.
This time, I opened it with Atom.
At the end of this file
export BROWSER=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
To add.
And save. You will be prompted for the administrator's name and password.
Save it, restart your terminal and launch Jupyter and the bug should be fixed: blush:
If you are using zsh instead of bash, you can rewrite ".zshrc" in the same way.
Then, just in case another method. At the terminal
cd
Finally, move to your home directory.
cd ./.jupyter
Go to the folder ".jupyter" with
ls -al
Check the files in the folder with. If you have "jupyter_notebook_config.py", it's OK. If not, I will make it.
How to make it in the terminal
jupyter notebook --generate-config
Just hit.
Now that you have "jupyter_notebook_config.py", edit it!
Open Finder and display hidden files with "command + shift +.". Since there is "jupyter_notebook_config.py" in the folder ".jupyter", open it with a text editor etc. in the same way as method 1.
Just add the following line to this file and you're good to go!
c.NotebookApp.browser = u'chrome'
It's like this. Save it, restart your terminal and launch Jupyter and the bug should be fixed: blush:
[Addition] If this doesn't help, try the following line instead (I didn't start up automatically again, and I was back in the following line)
c.NotebookApp.browser = u'open -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome %s'
By the way, if you want to specify it in safari,
c.NotebookApp.browser = u'Safari'
It will be.
There was also a post saying that an error message was displayed when "Google Chrome" was used instead of "chrome". Also, in the case of safari, there was a post saying that "u'Safari" was useless and that it was fixed with "'Safari'". https://github.com/jupyter/notebook/issues/2438#issuecomment-301736816
Reference site: https://github.com/jupyter/notebook/issues/2438#issuecomment-301736816