2

conda install nb_conda_kernels in the base environment throws the following error:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - nb_conda_kernels -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']

Your python: python=3.9

what do i need to do to make all the kernels visible to the jupyter notebook I'm firing from the base environment?

figs_and_nuts
  • 4,870
  • 2
  • 31
  • 56

1 Answers1

3

Conda Forge builds it for Python 3.9, so

conda install -c conda-forge nb_conda_kernels

Given the solve results, I'd guess your current channel configuration is defaults only, so it might be worth noting that sometimes mixing conda-forge and anaconda channels can get hairy (dynamic library issues) and make solves slow. An alternative is to create a new env dedicated for your Jupyter infrastructure (like what the nb_conda_kernels package hints at) and get all of that from Conda Forge.

Steps for Dedicated Jupyter Environment

# create environment only from Conda Forge
conda create -n jupyter --override-channels -c conda-forge jupyter nb_conda_kernels python=3.9

# activate
conda activate -n jupyter

# set env-specific channel options
conda config --env --set channel_priority strict
conda config --env --add channels conda-forge

Then always launch Jupyter (e.g., jupyter notebook) from this activated env.

merv
  • 67,214
  • 13
  • 180
  • 245
  • Thank you for your answer @merv .. 'An alternative is to create a new env dedicated for your Jupyter infrastructure (like what the nb_conda_kernels package hints at) and get all of that from Conda Forge.' - can you please explain more? Do i make an environment where i want to fire jupyter from and for that env keep the default channel conda-forge? – figs_and_nuts Apr 21 '21 at 20:41
  • @MiloMinderbinder yes, exactly that. I added an example for how to set up an environment with **conda-forge** prioritized, but without adding **conda-forge** to the global channels configuration. – merv Apr 21 '21 at 21:52
  • Can you please help at https://stackoverflow.com/questions/67210097/is-it-advisable-to-not-mix-packages-in-a-conda-environment-from-different-conda as well? – figs_and_nuts Apr 22 '21 at 14:34