I have the following `.qmd` file in my project:

```
---
jupyter:
  jupytext:
    text_representation:
      extension: .qmd
      format_name: quarto
      format_version: '1.0'
      jupytext_version: 1.13.8
  kernelspec:
    display_name: 'Python [conda env:first-carpal]'
    language: python
    name: conda-env-first-carpal-py
---

# Introduction

The goal of this project is to detection of first carpal bone in racehorse radiographs using machine learning.
```

When I try to render my project, I get

```
$ quarto render --execute --to html --output-dir public
[1/5] index.qmd

Starting Jupyter kernel...2022-04-14 10:13:37,192 - traitlets - WARNING - Kernelspec name conda-env-first-carpal-py cannot be found!
2022-04-14 10:13:37,192 - traitlets - ERROR - No such kernel named conda-env-first-carpal-py
Traceback (most recent call last):
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/jupyter_client/manager.py", line 71, in wrapper
    out = await method(self, *args, **kwargs)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/jupyter_client/manager.py", line 377, in _async_start_kernel
    kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/jupyter_client/utils.py", line 34, in ensure_async
    return await obj
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/jupyter_client/manager.py", line 340, in _async_pre_start_kernel
    self.kernel_spec,
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/jupyter_client/manager.py", line 170, in kernel_spec
    self._kernel_spec = self.kernel_spec_manager.get_kernel_spec(self.kernel_name)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/jupyter_client/kernelspec.py", line 294, in get_kernel_spec
    raise NoSuchKernel(kernel_name)
jupyter_client.kernelspec.NoSuchKernel: No such kernel named conda-env-first-carpal-py


No such kernel named conda-env-first-carpal-py
```

The problem here is that Jupyter does **not** know that I have the kernel `conda-env-first-carpal-py` in my machine:

```
$ jupyter kernelspec list
[ListKernelSpecs] WARNING | Config option `kernel_spec_manager_class` not recognized by `ListKernelSpecs`.
Available kernels:
  python3    /home/raniere/mambaforge/envs/jupyter/share/jupyter/kernels/python3
```

This is a old issue in the Jupyter ecosystem that Anaconda solved with [nb_conda_kernels](https://github.com/Anaconda-Platform/nb_conda_kernels). With nb_conda_kernels

> When a kernel from an external environment is selected, the kernel conda environment is automatically activated before the kernel is launched. This allows you to utilize different versions of Python, R, and other languages from a single Jupyter installation.

Would be great to have quarto able to discover and use kernels in conda environments.
2022-04-14T02:29:04Z
rgaiacs
closed
Use nb_conda_kernels to resolve "No such kernel"
https://github.com/quarto-dev/quarto-cli/issues/636