Issue
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?
Solution
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.
Answered By - merv
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.