-
Hi,
These my capabilities
When I run I have the below errors. Is there a way to solve these? Thank you
|
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 15 replies
-
That does not help, but I confirm I get the same error on WSL, windows 10 too
|
Beta Was this translation helpful? Give feedback.
-
That document works fine for me. It seems that there is some interaction between bash and wsl that is causing problems (but I have no idea what it is nor any clue about how to debug it). |
Beta Was this translation helpful? Give feedback.
-
@aborruso maybe this is because WSL It is working indeed in VSCODE so they may have found a way to tweak the configuration for this. I don't find any relevant clue for now, and also don't really know what could be the issue in Quarto. I'll try to have another look as I am on windows on how we are calling the jupyter kernel. |
Beta Was this translation helpful? Give feedback.
-
@cderv Can you think of a way we could proactively detect this condition and not create the daemon by default? |
Beta Was this translation helpful? Give feedback.
-
Some more related commentary: https://stackoverflow.com/questions/48539900/using-bash-commands-in-jupyter-notebook It we had a regex that could determine that a cell uses a bash command then we could use that to disable the daemon. Note that there are other scenarios that still might not work if the constraint is that the Jupyter kernel has to be launched from a bash shell (e.g. RStudio Jobs and VS Code Output are used for Quarto Preview and neither of those starts from a bash shell) |
Beta Was this translation helpful? Give feedback.
-
It does seem to work in the VS Code Output pane (at least on OS X). These are the conditions that trigger the use of the deamon: https://github.com/quarto-dev/quarto-cli/blob/main/src/core/platform.ts#L60-L62 We also prevent the use of the daemon if we are running on CI: https://github.com/quarto-dev/quarto-cli/blob/main/src/execute/jupyter/jupyter.ts#L231 If the problem is WSL then we just need an environment variable to detect that and we can mask it out. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I don't have ready access to a WSL instance. Could you let me know what the contents of both of these files is when running under WSL:
Also, could you let me know what all of the environment variables are within the notebook when running by including this cell:
|
Beta Was this translation helpful? Give feedback.
-
I check on some other linux environment like RStudio Cloud or RStudio workbench internally and this also errors the same when we execute with daemon. Passing I don't think this is a WSL only problem. It could be related to @aborruso does this really require ---
title: "demo"
format:
html:
code-fold: true
jupyter: python3
---
For a bash demonstration.
```{python}
!ls
``` I did not know about any of this before looking into this issue. I understand the the However, you need to have it install if you want to use So if we remove the About some solution to deactivate daemon by default, Regarding regex, it seems like IPython shell command can be off the following
However, there are also shell-magic command ( Regarding the use of ---
title: "demo"
format:
html:
code-fold: true
jupyter: bash
---
For a bash demonstration.
```{bash}
echo "hello world!"
``` |
Beta Was this translation helpful? Give feedback.
-
Fix to make magic commands automatically not use the daemon is here: 537cf3c |
Beta Was this translation helpful? Give feedback.
@aborruso maybe this is because WSL
bash
means windows WSL bash which is usually hereC:\Windows\System32\bash.exe
and this is a different bash thatbash_kernel
can handle probably. I see some related question in takluyver/bash_kernel#62 where it seems Windows is not really supported for bash kernel, and where there is solution for Windows user to use WSL bash when not in WSL.It is working indeed in VSCODE so they may have found a way to tweak the configuration for this. I don't find any relevant clue for now, and also don't really know what could be the issue in Quarto. I'll try to have another look as I am on windows on how we are calling the jupyter kernel.