2

i need to send the Jupyter notebook to another person, and enable him to open, enter inputs and running the notebook, to get the results.

please explain in a steps what should i do to share an interactive jupyter notebook to the end user, so he can enter inputs and running the code.

jana ardah
  • 23
  • 2

2 Answers2

0

Follow th following steps:

A. Save your Jupyter notebook file with a .ipynb extension.

B. Make sure that all the necessary libraries and packages are installed in the environment where the notebook will be run. You can provide that person with a requirement.txt file so he/she can create an adequate invironemnt.

C. Export the notebook as a runnable file: File -> Download as -> Runnable .ipynb. D. Share the exported .ipynb file

E. Instruct the other person to open the .ipynb file in Jupyter Notebookwhatever other envirnoment/platform he/she needs.

Of course, youu have to make sure that the other person has the necessary software installed on their computer to run the notebook, including Python and any necessary packages.

Once they open the notebook, they should be able to run the code cells and input their own data.

0

If you both have Google accounts, you could upload the notebook (.ipynb file) to Google Colaboratory and then share the link.

On Google Colab's "Welcome to Colaboratory" start page click on "File" -> "Upload notebook". From there you can either upload a local notebook file, or link from one stored in, e.g., GitHub.

If the code in your notebook relies on third party Python packages, e.g., NumPy, pandas, etc, then provided that the package is available on PyPi, you can add a first cell to the notebook that installs the required packages with, e.g.,

!pip install numpy

where the pip command must be preceded by an exclamation mark !.

You could also look at Microsoft's Azure notebooks.

Matt Pitkin
  • 3,989
  • 1
  • 18
  • 32