how to set the python kernel for quarto in Nix context #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: 2 comments 27 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 guess this problem isn't quite solved. I am explicitly setting $QUARTO_PYTHON to the python kernel I want: Which matches the kernel I'm using I am trying to run the sample code from the Quarto dashboard documentation https://quarto.org/docs/dashboards/, I can execute So it seems that the render command is not using the same python kernel as everything else. Is there another environment variable I need to set? I ran Which is the wrong Python, yet |
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_PYTHONenvironment 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).