First time here? Checkout the FAQ!
x
+1 vote
6k views
asked in Python by (230 points)  
  

1 Answer

+1 vote
answered by (116k points)  
selected by
 
Best answer

I think you need to use dill for this purpose. 
"dill extends python’s pickle module for serializing and de-serializing python objects to the majority of the built-in python types. Serialization is the process of converting an object to a byte stream, and the inverse of which is converting a byte stream back to on python object hierarchy."

conda install -c anaconda dill 

To save the Jupyter Notebook session:

import dill
dill.dump_session('notebook_session.db')

To restore the  session:

import dill
dill.load_session('notebook_session.db')

 

...