Skip to main content

安装

pip安装

pip3 install --upgrade pip

./python.exe -m pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple/

运行

  • 命令行
jupyter notebook --help
# 或
jupyter notebook -h
  • 脚本运行 - run_jupyter_in_curtt_dir
@REM @Author: CPS
@REM @email: 373704015@qq.com
@REM @Date: 2022-03-17 23:10:51.419347
@REM Last Modified by: CPS
@REM Last Modified time: 2022-03-17 23:10:51.419347
@REM Modified time: 2022-03-17 23:10:51.419347
@REM @file_path "D:\CPS\MyProject\test"
@REM @Filename "run_jupyter.bat"

@rem %~dp0 当前目录
@rem --NotebookApp.ip 允许所有ip访问,适用于开发环境,局域网调试
@rem --NotebookApp.token 完全取消权限验证,开发环境不需要验证,也可以指定某个token,固定
@rem --NotebookApp.port 指定端口

@echo off && setlocal enabledelayedexpansion
@chcp 65001


@set "notebook=None"
@set "userName=%COMPUTERNAME%"

@:: surface pro7
@if "%COMPUTERNAME%" == "DESKTOP-N5Q1EP1" (@set "notebook=D:\CPS\python\Python375_64\Scripts\jupyter-notebook.exe")

@:: home-pc
@if "%COMPUTERNAME%" == "DESKTOP-3MK3DS2" (@set "notebook=D:\CPS\python\python310_64\Scripts\jupyter-notebook.exe")

@:: office-pc
@if "%COMPUTERNAME%" == "DESKTOP-S9VGC7V" (@set "notebook=W:\CPS\python\python310_64\Scripts\jupyter-notebook.exe")

@:: 无指定相关路径
@if "%notebook%" == "None" (echo 当前计算机未指定 jupyter 绝对路径,请修复后重新运行脚本 & exit)

:start
@%notebook% %~dp0 --NotebookApp.port=4444 --NotebookApp.ip=* --NotebookApp.token='' & exit