方法:
首先,在终端中输入which jupyter notebook
,确定自己 Mac下 jupyter notebook的安装路径,比如我的:/Users/robin/software/anaconda3/bin/jupyter
然后进入 jupyter notebook配置文件(jupyter_notebook_config.py),
找到:#c.NotebookApp.browser = ''
,并在其下面输入:
# 输入自己火狐浏览器的路径
firefox_path = <jupyter notebook的安装路径>
import webbrowser
webbrowser.register('firefox', None