登录  | 立即注册

游客您好!登录后享受更多精彩

查看: 708|回复: 11

Jupyter notebook无法选择conda内核解决方案

[复制链接]

15

主题

0

回帖

7077

积分

论坛元老

积分
7077
发表于 2024-1-3 13:03:06 | 显示全部楼层 |阅读模式
  • 首先创建conda环境并进入环境
  • [backcolor=rgba(0,0,0,var(--tw-bg-opacity))][color=rgba(217,217,227,var(--tw-text-opacity))][backcolor=rgba(52,53,65,var(--tw-bg-opacity))][size=0.75]bashCopy code
    conda create -n test python=3.8    #这是注释 test替换为你想起的环境名字
    conda activate test




  • 确保你已经在 Conda 环境中安装了 Jupyter。你可以使用以下命令安装:
    [backcolor=rgba(0,0,0,var(--tw-bg-opacity))][color=rgba(217,217,227,var(--tw-text-opacity))][backcolor=rgba(52,53,65,var(--tw-bg-opacity))][size=0.75]bashCopy code
    conda install jupyter

    然后,确保在 Conda 环境激活的情况下启动 Jupyter Notebook。
  • 重启 Jupyter Notebook:在 Jupyter Notebook 中更改内核后,尝试重新启动 Jupyter Notebook 服务器。在终端中运行以下命令:
    [backcolor=rgba(0,0,0,var(--tw-bg-opacity))][color=rgba(217,217,227,var(--tw-text-opacity))][backcolor=rgba(52,53,65,var(--tw-bg-opacity))][size=0.75]bashCopy code
    jupyter notebook stopjupyter notebook

    然后在浏览器中打开新的 Jupyter Notebook 页面。
  • 使用 nb_conda_kernels:
    [backcolor=rgba(0,0,0,var(--tw-bg-opacity))][color=rgba(217,217,227,var(--tw-text-opacity))][backcolor=rgba(52,53,65,var(--tw-bg-opacity))][size=0.75]bashCopy code
    conda install nb_conda_kernels

    然后重新启动 Jupyter Notebook。
  • 安装 nb_conda_kernels 扩展,它可以帮助 Jupyter 在 Conda 环境中找到适当的内核。首先安装该扩展:


如果启动报错提示缺少chardet
ModuleNotFoundError: No module named 'chardet'

使用 Conda:
[backcolor=rgba(0,0,0,var(--tw-bg-opacity))][color=rgba(217,217,227,var(--tw-text-opacity))][backcolor=rgba(52,53,65,var(--tw-bg-opacity))][size=0.75]bashCopy code
conda install chardet


回复

使用道具 举报

0

主题

140

回帖

209

积分

中级会员

积分
209
发表于 2024-10-10 04:37:04 | 显示全部楼层
11111111111111
回复

使用道具 举报

0

主题

116

回帖

173

积分

注册会员

积分
173
发表于 2024-10-10 06:36:04 | 显示全部楼层
感谢LZ分享
回复

使用道具 举报

0

主题

34

回帖

50

积分

注册会员

积分
50
发表于 2024-10-10 10:51:41 | 显示全部楼层
感谢楼主分享,楼主辛苦了!
回复

使用道具 举报

0

主题

48

回帖

71

积分

注册会员

积分
71
发表于 2024-10-10 11:04:11 | 显示全部楼层
顶顶顶顶顶顶顶
回复

使用道具 举报

0

主题

94

回帖

140

积分

注册会员

积分
140
发表于 2024-10-10 11:10:35 | 显示全部楼层
感谢LZ分享
回复

使用道具 举报

0

主题

80

回帖

119

积分

注册会员

积分
119
发表于 2024-10-10 12:23:01 | 显示全部楼层
感谢LZ分享
回复

使用道具 举报

0

主题

132

回帖

197

积分

注册会员

积分
197
发表于 2024-10-10 12:38:48 | 显示全部楼层
感谢楼主分享,楼主辛苦了!
回复

使用道具 举报

0

主题

34

回帖

50

积分

注册会员

积分
50
发表于 7 天前 | 显示全部楼层
ggggggggggggg
回复

使用道具 举报

0

主题

100

回帖

149

积分

注册会员

积分
149
发表于 7 天前 | 显示全部楼层
66666666666666
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|九尾社区 ( 皖ICP备2021001835号 )

GMT+8, 2024-10-18 20:32 , Processed in 0.215559 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表