Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save changes in read-only Jupyter Notebook

I have opened a python Jupyter notebook but did not notice that it was in read-only, Not Trusted mode. How to save my changes now?

Things that I have tried and did not help:

  • File -> Make a Copy
  • File -> Save and Checkpoint
  • File -> Download as
  • File -> Trust Notebook
like image 935
Tamirlan Avatar asked Nov 21 '17 17:11

Tamirlan


People also ask

How do you save changes in Jupyter notebook?

Saving your edits is simple. There is a disk icon in the upper left of the Jupyter tool bar. Click the save icon and your notebook edits are saved.

How do you make a Jupyter notebook non editable?

Locked cells in Jupyter notebooks To confirm, hit the Edit button and exit the pop-up. These cells are now still runnable but can't be edited or deleted anymore. Once you're done editing all the cells that you want to lock, disable the Edit Metadata again by going to View > Cell Toolbar , and selecting None .

Do Jupyter notebooks automatically save?

Saving a Notebook Jupyter Notebooks autosave, so you don't have to worry about losing code too much. At the top of the page you can usually see the current save status: Last Checkpoint: 2 minutes ago (unsaved changes)


1 Answers

One hack around this issue:

  1. Select all cells (or cells that you need) in your read-only notebook. You can select all cells by clicking on the first cell and then shift+clicking the last cell.
  2. Copy all cells using CTRL+C (COMMAND+C if you are using MAC)
  3. Create a new jupyter notebook page
  4. Click CTRL+V (COMMAND+V if you are using MAC) twice
  5. Save your new notebook

Hope this hack helps

like image 116
Tamirlan Avatar answered Nov 03 '22 00:11

Tamirlan