Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

docs: more tips for coming from jupyter (#3053)

Akshay Agrawal2414b61222d4
diff --git a/docs/faq.md b/docs/faq.md
index 708adb6f9d..0ccf9f2b97 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -31,6 +31,7 @@
- [How do I use marimo on a remote server?](#faq-remote)
- [How do I make marimo accessible on all network interfaces?](#faq-interfaces)
- [How do I use marimo behind JupyterHub?](#faq-jupyter-hub)
+ - [How do I use marimo with JupyterBook?](#faq-jupyter-book)
- [How do I deploy apps?](#faq-app-deploy)
- [Is marimo free?](#faq-marimo-free)
@@ -491,6 +492,19 @@ marimo edit --host 0.0.0.0
JupyterHub can be configured to launch marimo using the [`jupyter-marimo-proxy`
package](https://github.com/jyio/jupyter-marimo-proxy).
+<a name="faq-jupyter-hub"></a>
+
+### How do I use marimo with JupyterBook?
+
+[JupyterBook](https://jupyterbook.org/en/stable/intro.html) makes it easy
+to create static websites with markdown and Jupyter notebooks.
+
+To include a marimo notebook in a JupyterBook, you can either export your
+notebook to an `ipynb` file, or export to `HTML`:
+
+1. export to ipynb: `marimo export ipynb my_notebook.py -o my_notebook.ipynb --include-outputs`
+2. export to HTML: `marimo export ipynb my_notebook.py -o my_notebook.html`
+
<a name="faq-app-deploy"></a>
### How do I deploy apps?
diff --git a/docs/guides/coming_from/index.md b/docs/guides/coming_from/index.md
index 11036f47af..2fc001f5f3 100644
--- a/docs/guides/coming_from/index.md
+++ b/docs/guides/coming_from/index.md
@@ -5,7 +5,6 @@
:maxdepth: 2
:hidden:
- jupyter
streamlit
jupytext
papermill
@@ -14,9 +13,18 @@
marimo is a **single tool** that replaces `jupyter`, `streamlit`, `jupytext`,
`ipywidgets`, `papermill`, and more.
+
+
| Guide | Description |
| :--------------- | :----------------------------------- |
-| {doc}`jupyter` | Transitioning from Jupyter notebooks |
| {doc}`streamlit` | Transitioning from Streamlit |
| {doc}`jupytext` | Transitioning from Jupytext |
| {doc}`papermill` | Transitioning from Papermill |
+
+```{admonition} Coming from Jupyter?
+:class: important
+
+See our [coming from Jupyter guide](/guides/coming_from/jupyter.md).
+```
+
+
diff --git a/docs/guides/coming_from/jupyter.md b/docs/guides/coming_from/jupyter.md
index 1e0263ddb3..df6d11ffb3 100644
--- a/docs/guides/coming_from/jupyter.md
+++ b/docs/guides/coming_from/jupyter.md
@@ -92,7 +92,8 @@ To adapt to the restriction, we suggest:
3. Mutatinge variables in the cell that defines them.
When working with **dataframes**, you might be used to redefining the same `df`
-variable in multiple cells. That won't work in marimo. Instead, either merge
+variable in multiple cells. That won't work in marimo. Instead, try merging
+the cells into a single cell:
_Don't_ do this:
@@ -143,6 +144,29 @@ Convert Jupyter notebooks to marimo notebooks at the command-line:
marimo convert your_notebook.ipynb -o your_notebook.py
```
+## Adapting to the absence of magic commands
+
+Because marimo notebooks are just Python (improving maintainability), marimo
+doesn't support IPython magic commands or `!`-prefixed console commands. Here
+are some alternatives.
+
+### Run console commands with subprocess.run
+
+To run a console command, use Python's [subprocess.run](https://docs.python.org/3/library/subprocess.html#subprocess.run):
+
+```python
+import subprocess
+
+# run: "ls -l"
+subprocess.run(["ls", "-l"])
+```
+
+### Installing packages with marimo's package manager
+
+Use marimo's package management sidebar panel to install packages to your current
+environment. Learn more in our [package management
+guide](/guides/editor_features/package_management.md).
+
## Interactive guide
This guide contains additional tips to help you adapt to marimo. Fun fact: the
diff --git a/docs/guides/index.md b/docs/guides/index.md
index 93c8363432..d32a7c776e 100644
--- a/docs/guides/index.md
+++ b/docs/guides/index.md
@@ -10,6 +10,7 @@
interactivity
outputs
expensive_notebooks
+ coming_from/jupyter
working_with_data/index
editor_features/index
configuration/index
@@ -41,6 +42,7 @@ tutorials that you can launch with `marimo tutorial` at the command line.
| {doc}`interactivity` | Using interactive UI elements |
| {doc}`outputs` | Creating markdown, plots, and other visual outputs |
| {doc}`expensive_notebooks` | Tips for working with expensive notebooks |
+| {doc}`/guides/coming_from/jupyter` | Tips for transitioning from Jupyter |
| {doc}`working_with_data/index` | Using SQL cells, no-code dataframe tools, and reactive plots |
| {doc}`editor_features/index` | View variables, dataframe schemas, docstrings, and more |
| {doc}`configuration/index` | Configure various settings |
@@ -52,5 +54,5 @@ tutorials that you can launch with `marimo tutorial` at the command line.
| {doc}`wasm` | Create notebooks in our online playground |
| {doc}`exporting` | Exporting notebooks to HTML and flat scripts |
| {doc}`deploying/index` | Deploying marimo notebooks and apps |
-| {doc}`best_practices` | Best practices to help you get the most out of marimo |
+| {doc}`best_practices` | Best practices to help you get the most out of marimo |
| {doc}`troubleshooting` | Troubleshooting notebooks |
diff --git a/docs/index.md b/docs/index.md
index 3b4287fcc6..bd4b25366f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -324,6 +324,8 @@ for the better.
Discord <https://marimo.io/discord?ref=docs>
Newsletter <https://marimo.io/newsletter>
Twitter <https://twitter.com/marimo_io>
+ Bluesky <https://bsky.app/profile/marimo.io>
+ Awesome marimo <https://github.com/marimo-team/awesome-marimo>
Marimo Cloud Waitlist <https://marimo.io/cloud>
Blog <https://marimo.io/blog>
```