From 24887019cadb805a77c849b9920d70f3b94aacaf Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Sat, 8 Oct 2022 22:07:39 +0400 Subject: [PATCH] Document how to enable pandas.read_clipboard() --- docs/using/recipes.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/using/recipes.md b/docs/using/recipes.md index 97ef4f767e..de01c773fd 100644 --- a/docs/using/recipes.md +++ b/docs/using/recipes.md @@ -550,3 +550,21 @@ RUN PYV=$(ls "${CONDA_DIR}/lib" | grep ^python) && \ rm -rf "/home/${NB_USER}/.cache/matplotlib" && \ python -c 'import matplotlib.font_manager;print("font loaded: ",("Source Han Sans CN" in [f.name for f in matplotlib.font_manager.fontManager.ttflist]))' ``` + +## Enable clipboard in pandas on Linux systems + +```{admonition} Additional notes + This solution works on Linux host systems. + It is not required on Windows and won't work on macOS. +``` + +To enable `pandas.read_clipboard()` functionality, you need to have `xclip` installed +(installed in `minimal-notebook` and all the inherited images) +and add these options when running `docker`: `-e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix`, i.e.: + +```bash +docker run -it --rm \ + -e DISPLAY \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + jupyter/minimal-notebook +```