# Install dill if you have not import dill dill.dump_session('env_name.db')
pip install dill import dill dill.dump_session('notebook_env.db') # Save variables dill.load_session('notebook_env.db') # Load variables