step1:pip install jupyter step2:在ipynb文件所在目录执行以下命令: jupyter nbconvert --to script *.ipynb step3:在该目录下会有和ipynb同名的py文件