how to set the python kernel for quarto #12506
-
DescriptionI'm having trouble with quarto running python code. Specifically, it is not finding the correct kernel. I can import my environment modules in a qmd document in rstudio without a problem, yet when I run The twist here is that I use nix, and so I don't use a typical Any help would be much appreciated. In general, I will be using pre-rendered |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 15 replies
-
Please read the documentation before asking questions. Thank you. https://quarto.org/docs/computations/python.html#kernel-selection Additionally, there are other discussions about kernel discovery issue. Finally, the troubleshooting guide: https://quarto.org/docs/troubleshooting/#advanced
The Quarto CLI packaged by Nix doesn't use the proper dependencies. There is no guarantees it works properly and as designed/expected by the Quarto team. |
Beta Was this translation helpful? Give feedback.
I don't know how your environments are activated but I believe the issue is there.
You could use
QUARTO_PYTHON
environment variable to force Quarto to use whatever version you want.This is also documented on the same page by the way: https://quarto.org/docs/computations/python.html#installation
And check your
PATH
. I bet you have multiple paths to Python binary in it (which is bad).