脚本启动 jupyter notebok
    在桌面新建文本文件 “jupyter.bat” (以bat结尾就行),输入以下代码,倒数第二行的D:\Jupyter_workspace修改为你想要作为根目录的路径

    1. %隐藏cmd窗口%
    2. @echo off
    3. if "%1"=="h" goto begin
    4. start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
    5. :begin
    6. cd /d D:\Jupyter_workspace
    7. jupyter notebook

    双击该文件即可启动jupyter notebok,并且不会弹出命令行
    image.png
    在任务管理器可以看到 jupyter-notebook.exe 正在运行,可以右键结束进程。
    image.png

    脚本关闭 jupyter notebok
    新建文本文件 “Kill Jupyter.bat” (以bat结尾就行),输入以下代码:

    1. %隐藏cmd窗口%
    2. @echo off
    3. if "%1"=="h" goto begin
    4. start mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
    5. :begin
    6. taskkill /f /im jupyter-notebook.exe

    双击该文件即可关闭 jupyter notebok
    image.png
    其实 jupyter notebok 占用内存也不大,不在意的话可以不关闭,让它一直在后台运行,这样你随时都可以打开浏览器使用
    ————————————————
    版权声明:本文为CSDN博主「BuXianShan」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_43479622/article/details/97495807