install nbconvert pip install nbconvert convert jupyter nbconvert --to script filename.ipynb $ jupyter nbconvert --to script UtilLayers_renew.ipynb result [NbConvertApp] Converting notebook UtilLayers_renew.ipynb to script [NbConvertApp] Writing 4528 bytes to UtilLayers_renew.py