python - python 3.9+的nb_conda_kernels等价物是什么?

标签 python python-3.x jupyter-notebook ipython conda

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/

相关文章:

python - 在 Windows 中安装 Yapsy for Python 脚本

python - Pandas 条件排名

python - 将 json 文件读取为 pandas 数据框?

python - 使用 python3 时 Lambda 函数错误

python - 如何使用Docker连接Jupyter Notebook

python - 在 r 中使用 igraph 导出图形

python-3.x - 在 python 之外为 scikit-video 设置 FFmpeg 路径

python - 如何使用 Visual Studio 2017 连接到 Jupyter 笔记本

python - 如何跟踪当前在 Jupyter 笔记本中运行的单元格?

Python subprocess.check_output 输出与同一命令的 bash 输出不同