2
$\begingroup$

I have to download code written in a Google Colab notebook, because I need to send it via email. How do I do this?

$\endgroup$
5
  • 2
    $\begingroup$ Click file on the menu and select "download .ipynb" or "download .py" (Jupyter Notebook or Python file) $\endgroup$ – serali Dec 15 '19 at 15:24
  • $\begingroup$ Thanks for answering, to download the notebook I have to choose download .ipynb right? $\endgroup$ – J.D. Dec 15 '19 at 15:29
  • 1
    $\begingroup$ Yes, or you can take smaller size file format and later open it as ipynb. $\endgroup$ – vienna_kaggling Dec 15 '19 at 15:32
  • 1
    $\begingroup$ Correct. Also, you can share it directly without downloading with other users through Google Drive. It will be located in "Colab Notebooks" folder. Right click on the file for sharing options available. $\endgroup$ – serali Dec 15 '19 at 15:43
  • $\begingroup$ @serali, please make that an answer $\endgroup$ – Ben Reiniger Mar 12 at 16:09
2
$\begingroup$

You do not need to download Google Colab to send a file through email.

To send directly:

  • On Upper right-hand side there is a share button, Click on it.
  • A pop-up appears, Enter email addresses or usernames in the field 'Add People and groups'.
  • (Optional) Go to the setting gear button upper right corner and adjust permissions.
  • Click on 'Done'.

Download then send to email:

  • Click on the "File" menu in the upper left corner.
  • A popup appears, find 'Download .ipynb' and click on it.
$\endgroup$
1
  • $\begingroup$ This works and answers OP's question. What I want to know is, how can we download them programmatically via the command line, and get just the raw .ipynb file without all the extra HTML header stuff? (Just running curl or wget on the sharing url gives you extra HTML) $\endgroup$ – sh37211 Mar 23 at 18:58
1
$\begingroup$

Click file on the menu and select "download .ipynb" or "download .py" (Jupyter Notebook or Python file).

To download the notebook you have to choose download .ipynb

Also, you can share it directly without downloading with other users through Google Drive. It will be located in "Colab Notebooks" folder. Right click on the file for sharing options available.

$\endgroup$
0
$\begingroup$

To download a Google Colab notebook as a Jupyter Notebook which you can easily send and upload back into Colab:

  1. Click on "File" in the main menu
  2. Click on "Download .ipynb"

That's it.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.