什么是python 3.9+的nb_conda_kernels等效项? [英] what is nb_conda_kernels equivalent for python 3.9+?

查看:646
本文介绍了什么是python 3.9+的nb_conda_kernels等效项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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笔记本可见?

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

推荐答案

Conda Forge为Python 3.9构建了它,所以

Conda Forge builds it for Python 3.9, so

conda install -c conda-forge nb_conda_kernels

鉴于求解结果,我想您当前的频道配置仅为默认值,因此可能值得注意的是,有时会混用 conda-forge anaconda 频道可能会出现毛发(动态库问题)并导致求解速度变慢.一种替代方法是创建一个专门用于Jupyter基础架构的新环境(例如 nb_conda_kernels 包提示),并从Conda Forge获取所有信息.

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.

# 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笔记本).

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

这篇关于什么是python 3.9+的nb_conda_kernels等效项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆