【jupyter】文件路径的更改

使用过 jupyter notebook 环境的同行, 都体会过随机生成 .html 静态网页的过程, 虽然文档较小, 但是不堪反复使用积少成多。本文基于windows系统。

找到 runtime 目录

一般 jupyter 默认 runtime 在下述格式目录中

C:\Users\用户名\AppData\Roaming\jupyter\runtime

复制一套 .html, .json 文件 (注意编号一致) 到期望的目录 "D://path/to/your/custom/" 。

cmd 环境下的python

建立 .bat 文件

cmd 复制代码
@echo off
start "Jupyter Server" cmd /k jupyter notebook
start "" "file:///D:/path/to/your/custom/htmlfile.html" 

双击运行 .bat 文件

conda 环境下的 python

建立 .bat 文件

cmd 复制代码
@echo off
call D:\path\miniconda3\Scripts\activate.bat
start "Jupyter Server" cmd /k jupyter notebook
start "" "file:///D:/path/to/your/custom/htmlfile.html"

双击运行 .bat 文件

相关推荐
databook7 小时前
Manim实现脉冲闪烁特效
后端·python·动效
程序设计实验室8 小时前
2025年了,在 Django 之外,Python Web 框架还能怎么选?
python
倔强青铜三9 小时前
苦练Python第46天:文件写入与上下文管理器
人工智能·python·面试
用户25191624271112 小时前
Python之语言特点
python
刘立军13 小时前
使用pyHugeGraph查询HugeGraph图数据
python·graphql
数据智能老司机16 小时前
精通 Python 设计模式——创建型设计模式
python·设计模式·架构
数据智能老司机17 小时前
精通 Python 设计模式——SOLID 原则
python·设计模式·架构
c8i19 小时前
django中的FBV 和 CBV
python·django
c8i19 小时前
python中的闭包和装饰器
python
这里有鱼汤1 天前
小白必看:QMT里的miniQMT入门教程
后端·python