# How-to: Share your jupyter notebook

**URL:** <https://forum.access-hive.org.au/t/how-to-share-your-jupyter-notebook/692>\
**Category:** Technical\
**Tags:** jupyter, knowledge-base, how-to\
**Created:** [24 April 2023 00:59 UTC](https://forum.access-hive.org.au/t/how-to-share-your-jupyter-notebook/692 "2023-04-24T00:59:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [24 April 2023 00:59 UTC](https://forum.access-hive.org.au/t/how-to-share-your-jupyter-notebook/692/1 "2023-04-24T00:59:26Z")

</div>

## About

How to share your notebook code so that others can assist you

## Who is this for?

Anyone who needs help with their code, or just wants to share what they have done

## How do I share my notebook?

You can [post code snippets using three backticks](https://meta.discourse.org/t/select-the-programming-language-used-in-code-blocks/19247), or using the preformatted text button in the edit window

 ![Code snippets](https://us1.discourse-cdn.com/flex020/uploads/access1/original/1X/7fbf7d7fc7f82fa9a4adbfa62c7958391eb91934.png)

But that doesn’t work very well for jupyter notebooks: they’re not rendered correctly.

Here are some better ways:

1. [notebooksharing.space](https://notebooksharing.space)

> **[The fastest way to share your notebooks - announcing NotebookSharing.space](https://words.yuvi.in/post/announcing-notebooksharing-space/)**
>
> Sharing notebooks is harder than it should be.
> You are working on a notebook (in Jupyter, RStudio, Visual Studio Code, whatever), and want to share it quickly with someone. Maybe you want some feedback, or you’re demonstrating a technique, or there...

1. [GitHub gist](https://gist.github.com/) + [nbviewer](https://nbviewer.jupyter.org/)

> **[How to share Jupyter Notebooks – Andrea Zonca](https://www.zonca.dev/posts/2020-09-15-how-to-share-jupyter-notebooks.html)**

Once you have a link to your notebook post it into your topic to refer to your notebook. Note you can still post inline code snippets from the notebook to highlight specific code ideas, or changes.

1. [mybinder.org](https://mybinder.org/)

Add your notebook to a public GitHub repo, along with an environment configuration file (e.g. an `environment.yml` specifying an Anaconda environment for your notebook). Enter the details of that repo at [mybinder.org](http://mybinder.org) and you’ll be provided with a shareable link where people can actually run your notebook. (Note, [mybinder.org](http://mybinder.org) is a community effort that relies on donors to provide cloud resources to run your notebooks. The project is currently at reduced capacity because [one of the key funding sources has ended](https://blog.jupyter.org/mybinder-org-reducing-capacity-c93ccfc6413f). If you use and like binder, maybe consider donating to the project.)

---

<div class="post-metadata">

**Author:** ![PSpence](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/pspence/32/298_2.png) [@PSpence](https://forum.access-hive.org.au/u/PSpence)\
**Post date:** [26 April 2023 23:51 UTC](https://forum.access-hive.org.au/t/how-to-share-your-jupyter-notebook/692/2 "2023-04-26T23:51:07Z")

</div>

@aidan thanks for this helpful info. Re option 2 (gist) how do I install gh on gadi? I followed instructions from here:

> **[GitHub - cli/cli: GitHub’s official command line tool](https://github.com/cli/cli#installation)**
>
> GitHub’s official command line tool. Contribute to cli/cli development by creating an account on GitHub.

e.g: conda install gh --channel conda-forge  
but got this error message:  
Downloading and Extracting Packages

Preparing transaction: done  
Verifying transaction: failed

EnvironmentNotWritableError: The current user does not have write permissions to the target environment.  
environment location: /g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.10  
uid: 5564  
gid: 3204  
Thanks!

---

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [27 April 2023 00:11 UTC](https://forum.access-hive.org.au/t/how-to-share-your-jupyter-notebook/692/3 "2023-04-27T00:11:22Z")

</div>

You don’t need to install it, it is already in the `conda/analysis3` environments:

```auto
$ which gh
/g/data3/hh5/public/apps/miniconda3/envs/analysis3-23.01/bin/gh

```

> [@PSpence](#):
>
> environment location: /g/data3/hh5/public/apps/miniconda3/envs/analysis3-22.10

FYI you got this error message because you’re trying to install into the `conda/analysis3-22.10` environment, which you don’t have write permissions to, and shouldn’t. The best way to add a package that isn’t in the `conda` environments, and which the CLEX team don’t wish to add, is to use

```auto
pip install <packagename> --user

```

which will install it into your `~/.local` directory. Note that this really only works successfully for pure python packages, i.e. packages which do not have external dependencies on compiled libraries.

---

<div class="post-metadata">

**Author:** ![dougiesquire](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/dougiesquire/32/16_2.png) [@dougiesquire](https://forum.access-hive.org.au/u/dougiesquire)\
**Post date:** [22 May 2023 01:25 UTC](https://forum.access-hive.org.au/t/how-to-share-your-jupyter-notebook/692/4 "2023-05-22T01:25:51Z")

</div>

A third option:

1. [mybinder.org](https://mybinder.org/)

---

<div class="post-metadata">

**Author:** ![Aidan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.access-hive.org.au/aidan/32/42_2.png) [@Aidan](https://forum.access-hive.org.au/u/Aidan)\
**Post date:** [3 April 2024 06:03 UTC](https://forum.access-hive.org.au/t/how-to-share-your-jupyter-notebook/692/5 "2024-04-03T06:03:59Z")

</div>

> [@dougiesquire](#):
>
> A third option

I should have said this before, but feel free to add that to the original topic @dougiesquire
