conda install nb_conda_kernels
在基本环境中抛出以下错误:
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
我需要做什么才能使所有内核对我从 base
触发的 jupyter 笔记本可见环境?
最佳答案
Conda Forge 为 Python 3.9 构建它,所以
conda install -c conda-forge nb_conda_kernels
鉴于求解结果,我猜您当前的 channel 配置是 默认 只是,所以可能值得注意的是有时混合 conda-forge 和 python channel 可能会变得多毛(动态库问题)并使解决速度变慢。另一种方法是创建一个专用于您的 Jupyter 基础架构的新环境(如 what the nb_conda_kernels
package hints at )并从 Conda Forge 获取所有这些。专用 Jupyter 环境的步骤
# 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
然后总是从这个激活的环境中启动 Jupyter(例如, jupyter notebook
)。
关于python - python 3.9+的nb_conda_kernels等价物是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67202874/