Can I run Jupyter notebook cells in commandline?

nbconvert (a jupyter tool for notebook conversion) allows you to do this without any extra packages:

Just go to your terminal and type

$ jupyter nbconvert –to notebook –inplace –execute mynotebook.ipynb

Source

(Thanks Stephan for suggesting the --inplace flag)

NOTE: This said, I’d try to convert everything you need to a proper script. Jupyter notebooks are thought to use for exploring and sharing results, and not as a replacement of traditional programs.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)