在虚拟机的python中安装配置Jupyter Notebook

一、生成或找到配置文件

复制代码
jupyter notebook --generate-config

二、配置文件内容

jupyter_notebook_config.py文件中,你需要进行以下配置:

设置允许访问的IP地址

复制代码
c.NotebookApp.ip = '*'

设置密码

复制代码
c.NotebookApp.password = 'sha1:xxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'  # 替换为你的哈希值

这个密码通过执行jupyter notebook password命令,返回一个json文件,里面有这个密码,复制过来

关闭自动打开浏览器

复制代码
c.NotebookApp.open_browser = False

设置端口:(不设也行)

复制代码
c.NotebookApp.port = 8888

允许远程访问

复制代码
c.NotebookApp.allow_remote_access = True

修改完直接保存就可以了

执行jupyter notebook --allow-root启动成功

在客户端上访问Jupyter Notebook

http://192.168.1.100:8888

相关推荐
cup114 小时前
[技术复盘] Windows Python 打包实战:Nuitka 环境踩坑总结与 CI 自动化构建全指南
python·ai·环境变量·ci·nuitka·skill
aqi006 小时前
15天学会AI应用开发(七)有了大模型为什么还要引入RAG
人工智能·python·大模型·ai编程·ai应用
金銀銅鐵8 小时前
用 Python 实现 Take-Away 游戏
python·游戏
copyer_xyf9 小时前
Agent 流程编排
后端·python·agent
copyer_xyf9 小时前
Agent RAG
后端·python·agent
copyer_xyf9 小时前
【RAG】向量数据库:milvus
后端·python·agent
copyer_xyf9 小时前
Agent 记忆管理
后端·python·agent
星云穿梭1 天前
用Python写一个带图形界面的学生管理系统——完整教程
python
金銀銅鐵1 天前
用 Pygame 实现 15 puzzle
python·数学·游戏