进入demo.ipynb所在目录下 # 指定文件 jupyter nbconvert --to script demo.ipynb # 所有.ipynb文件 jupyter nbconvert --to script *.ipynb