首先是要 安装 Anaconda 。
默认情况下,安装好 Anaconda 后打开 jupyter notebook, 访问本地localhost:8888
即可。但是如果要访问另一台机器,比如远端服务器上的 notebook, 即默认是不支持 172.104.105.119:8888
这样的访问,需要额外配置。
设置 jupyter notebook 可远程访问的官方指南在这里,在远端服务器上执行以下操作:
1. 生成一个 notebook 配置文件
默认情况下,配置文件 ~/.jupyter/jupyter_notebook_config.py
并不存在,需要自行创建。使用下列命令生成配置文件:
jupyter notebook --generate-config
如果是 root 用户执行上面的命令,会发生一个问题:
Running as root it not recommended. Use --allow-root to bypass.
提示信息很明显,root 用户执行时需要加上 --allow-root
选项。