1、远程服务器中jupyter 安装
pip3 install jupyter notebook
2、生成配置文件
|
3、生成密码,进入python3 终端
>>>from notebook.auth import passwd
>>>passwd()
Enter password:
Verify password:
Out[2]: 'sha1:2fef931a2ead:3621766583f6a4d00aa329bef681dd89984ae355'
sha1:2fef931a2ead:3621766583f6a4d00aa329bef681dd89984ae355
这一串就是要jupyter_notebook_config.py 添加的密码。
4、修改配置文件
vim ~
/
.jupyter
/
jupyter_notebook_config.py
在上面的py文件中修改
c.NotebookApp.ip='你的主机名'
c.NotebookApp.open_browser = False
c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'
c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口
5、运行服务
hadoop@adiao:~$ jupyter notebook
或在root用户下
root@adiao:~# jupyter notebook --allow-root
参考:https://blog.csdn.net/wl981292580/article/details/83659154