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.

nb_conda_kernels and jupyter notebook extensions

See original GitHub issue

When using extensions, dependencies (to my knowledge) have to be installed into each kernel environment separately.

A typical example would be the jupyter extension Autopep8 requries the package autopep8. Currently I have to install autopep8 in every kernel environment.

Is there a way to only install such extension dependencies to the actual notebook enviornment and not to every kernel environment I want to use in a notebook?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

fcollonvalcommented, Aug 20, 2021

The discussion is getting quite of topic.

To sum-up, the requirement of autopep8 on each environment is a consequence of the implementation in jupyter-autopep8. @skwde you could open a request on that repository to use the library installed in the server environment rather than in the kernel environment.

If you need to share packages between environment, I suggest (but this can be dangerous) to make use of PYTHONPATH.

A small comment, I don’t know the rational behind the need of autopep8 requirement to be in the kernel environment. But I can image it has to do with supporting various versions of Python.

skwdecommented, Aug 20, 2021

@tbsexton I agree that environment.yml are great to keep track of environments and also share them.

However I still don’t think that packages, installed because they are jupyter extension dependencies such as autopep8, should be in the ipykernel environment. They should stay with the extension. Otherwise it simply leads to duplicated installes.

Also your point regarding interoperability does not realy hold in my opinion. Just image the person I am sharing the enviornment with doesn’t use the same jupyter extensions. Worse still, if the person doesn’t even use jupyter than he gets an environment with not only ipykernel as a useless package but also numerous others.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Jupyter Notebook extensions - Anaconda Documentation
This extension provides conda environment and package access from within Jupyter Notebook. ... To add a new conda environment, click the + button...
Read more >
Unofficial Jupyter Notebook Extensions - Read the Docs
The jupyter_contrib_nbextensions package contains a collection of community-contributed unofficial extensions that add functionality to the Jupyter notebook ...
Read more >
How to set up Anaconda and Jupyter Notebook the right way
Also, did you ever install Jupyter Notebook extensions in each conda environment? ... conda install -c conda-forge nb_conda_kernels ...
Read more >
Conda environments not showing up in Jupyter Notebook
Sounds like you may have the some things mixed up. jupyter and nb_conda_kernels should be installed in one env - this is where...
Read more >
Conda environments in Jupyter ecosystem without pain
We could install JupyterLab in the project1 environment. But if we do so, we will have to install JupyterLab and its extensions in...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found