1) 创建Jupyter notebook的配置文件jupyter_notebook_config.py,在终端中输入:
jupyter notebook --generate-config
或者版本不同
ipython profile create
在到命令输出的位置找到jupyter_notebook_config.py,sudo gedit或者vim打开,有时候要先chmod赋予权限,把该文件的:
c.NotebookApp.ip = '127.0.0.1'
c.NotebookApp.open_browser = True
这两个去除注释,打上自己的端口,我用的是127.0.0.1即可