ipynb转化py文件 pip install jupyter cd ipynb文件所在目录 jupyter nbconvert --to script xxxx.ipynb 执行成功后会在目录下生成一个同名py文件“XXXX.py”