小淼博客

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  282 随笔 :: 0 文章 :: 102 评论 :: 102万 阅读

一、安装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 配置文件

  1. 打开编辑 jupyter_notebook_config.py 文件
    sudo vim ~/.jupyter/jupyter_notebook_config.py
  2. 在文件的最后末尾位置添加如下内容:
    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
    
  3. 保存退出启动 jupyter notebook
    jupyter notebook

三、登录测试

  1. 在局域网其他主机上打开浏览器输入运行 jupyter notebook 的主机 IP

    http://192.168.xx.xx:8888

  2. 进入登陆界面
    image

  3. 登陆如下图所示:
    image

Reference

https://blog.csdn.net/zds13257177985/article/details/128022829

posted on   小淼博客  阅读(1021)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
历史上的今天:
2018-05-06 数据结构解决相关问题

大家转载请注明出处!谢谢! 在这里要感谢GISPALAB实验室的各位老师和学长学姐的帮助!谢谢~

点击右上角即可分享
微信分享提示