【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 文件

相关推荐
前端程序猿之路8 分钟前
模型应用开发的基础工具与原理之Web 框架
前端·python·语言模型·学习方法·web·ai编程·改行学it
坐吃山猪13 分钟前
Python之PDF小工具
开发语言·python·pdf
achi01015 分钟前
从 0 到 1 掌握 Gunicorn:让 Python Web 应用飞起来的 WSGI 服务器
python·flask·性能调优·容器化·gunicorn·wsgi·并发模型
小鸡吃米…19 分钟前
Python - 构造函数
开发语言·python
Lenyiin22 分钟前
第 97 场周赛:公平的糖果交换、查找和替换模式、根据前序和后序遍历构造二叉树、子序列宽度之和
java·c++·python·leetcode·周赛·lenyiin
Clarence Liu25 分钟前
MacOS 在Trae IDE中构建现代C++开发环境:从新手到高效的完整指南
c++·ide·macos
znhy_2327 分钟前
day42打卡
python
SCBAiotAigc30 分钟前
在Ubuntu上使用docker compose安装普通(不支持GPU)的Ollama服务
人工智能·python·ubuntu·ollama
小智RE0-走在路上33 分钟前
Python学习笔记(10) -- 异常,模块,包
笔记·python·学习