一、安装Jupyter Notebook
直接使用命令行进行安装,如下所示:
sudo pip install jupyter
可能存在的问题是 ipython 的版本不匹配的问题,可以直接安装 ipython ,然后再安装 jupyter.
sudo pip3 install ipython
二、配置Jupyter Notebook使能远程访问功能
1. 生成 jupyter 配置文件
jupyter notebook --generate-config
2. 通过 ipython 设置网页远程登陆密码
mm@ubuntu-MS:~$ ipython3
Python 3.6.9 (default, Dec 8 2021, 21:08:43)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.3 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'argon2:$argon2id$v=19$m=102xxxxxxxxxxxvWbbr1AxxxxxxnOgPL2xxxxxxxxxxaq'
In [3]: exit()
3. 修改 jupyter 配置文件
- 打开编辑 jupyter_notebook_config.py 文件
sudo vim ~/.jupyter/jupyter_notebook_config.py
- 在文件的最后末尾位置添加如下内容:
c.NotebookApp.ip='*' c.NotebookApp.password='argon2:$argon2id$v=19$m=102xxxxxxxxxxxvWbbr1AxxxxxxnOgPL2xxxxxxxxxxaq' c.NotebookApp.open_browser = False c.NotebookApp.port =8888 c.IPKernelApp.pyplot = 'inline' c.NotebookApp.allow_remote_access = True
- 保存退出启动 jupyter notebook
jupyter notebook
三、登录测试
-
在局域网其他主机上打开浏览器输入运行 jupyter notebook 的主机 IP
http://192.168.xx.xx:8888
-
进入登陆界面
-
登陆如下图所示:
Reference
https://blog.csdn.net/zds13257177985/article/details/128022829
转载请注明出处!感谢GISPALAB实验室的老师和同学们的帮助和支持~
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
2018-05-06 数据结构解决相关问题