question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Separate coconut kernel installation and `nb_conda_kernel` support

See original GitHub issue

Using nb_conda_kernels as my primary workflow (i.e. not needing a separate jupyter notebook server running for every kernel, just installing a kernel in each environment with one central environment running the server) I would

  1. install jupyter, nb_conda_kernels, etc in the main/base/default environment, and run jupyter.
  2. install ipykernel, project dependencies, etc in a project-specific environment.
  3. open jupyter interface, and switch kernel. Not to “python 3”, etc, but to Python [conda env:projectenvname] which gives me all of my packages/dependencies needed for that project, still on the one jupyter server.

My question revolves around using coconut within this workflow (which is becoming more standard in teaching/academic circles afaik). I have coconut[all] installed in both the main and the “cocotest” project environment, and have run coconut --jupyter successfully in both as well. But I still cannot access coconut syntax directly (i.e. no magic functions) within a notebook using the Python [conda env:cocotest] kernel. Given that nb_conda_kernels explicitly supports other languages (ipykernel, r-irkernel, anything on that list of languages above) as long as the kernel is installed inside that environment, i don’t really understand why coconut isn’t working?

I did also try running coconut --jupyter notebook from the main environment, and selecting the Python [conda env:cocotest] kernel, but still no dice.

I think one solution is to either make a separate installable or maybe optional coconut[kernel] installation that will act like ipykernel, so that users can add coconut support in jupyter to their versioned dependency list (e.g. environment.yml, etc), just like they can now with ipykernel and r-irkernel, while only needing to run a single jupyter server at any given time.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
evhubcommented, May 12, 2020

@tbsexton Try again with pip install ---upgrade coconut-develop>=1.4.3-post_dev25 and I suspect it’ll work this time (also you shouldn’t even have to run coconut --jupyter now—it should automatically install the kernel in the right place for nb_conda_kernels on pip install).

I also just added a pyproject.toml that should give you the right setuptools by default—let me know if that’s working for you.

0reactions
fabianhjrcommented, Nov 5, 2020

Installing via pip install conda-develop[all] after removing the old coconut installation leads to an error unless i manually update setuptools in every conda environment (even if I start with a fresh one)

RuntimeError: bdist_wheel not supported for setuptools versions < 18 (run 'pip install --upgrade setuptools' to fix)

Can this version of setuptools be added as a dependency?

This might have been related to #560

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub - Anaconda-Platform/nb_conda_kernels
Package for managing conda environment-based kernels inside of Jupyter ... Add the following configuration to install all kernel spec for the current user:....
Read more >
nb-conda-store-kernels - PyPI
This extension enables a Jupyter Notebook or JupyterLab application to access environments stored in Conda-Store and run kernels for Python, ...
Read more >
Setting up kernel for conda environment | by Dhruv Sharma
This basically takes hold of the native python installation on your machine ... This creates a separate kernel automatically for each conda ......
Read more >
Get Your Conda Environment to Show in Jupyter Notebooks
(base)$ conda activate new-env(new-env)$ conda install ipykernel ... your environment kernels which could help keep that list tidy.
Read more >
Jupyter notebook can't find kernels for conda environments ...
In the new environment I ran conda install --channel conda-forge nb_conda_kernels to install version 2.2.3. Share.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found