10000 GitHub · Where software is built
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Coconut equivalent of ipykernel install #765
Closed
@rtbs-dev

Description

@rtbs-dev

Hi there! I've moved away from nb_conda_kernels due to... so many conflicting dependencies and CI/CD nightmares. But the pip install coconut[kernel] technique still works great for this workflow, which makes use of pyenv/virtualenv. Jupyter/lab can find the kernel just fine, provided a small kernel.json config file. I figured out how to add it in a way that duplicates those workflows.

Proposal

Request: add a coconut kernel install [--name] [--user] cli command

functionality: creates a ~/.local/share/jupyter/kernels/{myenv}-coconut/kernel.json spec file, with the contents:

{
 "argv": [
  "${PYENV_ROOT}/versions/{myenv}/bin/python",
  "-m",
  "coconut.icoconut",
  "-f",
  "{connection_file}"
 ],
 "display_name": "{myenv}-coconut",
 "language": "coconut"
}

Where the {PYENV_ROOT} and {myenv} variables get replaced with the pyenv root dir and currently-activate environment name, respectively.

For now I just copy+edit that file around to new kernel folders every time I make one that uses Coconut, but that would be easier if there was a coconut equivalent to the python -m ipykernel install --user --name {myenv} command that I run for python kernels that makes the kernel.json automatically.

Assumptions: The user wants a coconut kernel to have the same name as the python environment it's originating from, but with an added -coconut in the name. Seemed good enough?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0