Wednesday 30 September 2020

Convert IPython notebook file .ipynb to python script .py on Ubuntu

Try to use the first commands, if its not working then use the second one:
  1. jupyter nbconvert --to script stock_analysis.ipynb 
  2. jupyter nbconvert --to python stock_analysis.ipynb

If you are getting an error as:

AttributeError: module 'tornado.web' has no attribute 'asynchronous'

 Try this

pip3 install --upgrade nbconvert 

After the above command has ran successfully try the previous command listed as 1 or 2.