当前位置:网站首页>jupyter notebook/lab 切换conda环境
jupyter notebook/lab 切换conda环境
2022-06-30 21:21:00 【每天都想躺平的大喵】
在jupyter中,我们经常有切换不同conda环境的需要,这里总结了一下所需步骤。
在此之前先回答一个我之前有疑惑的问题:
需要在每个conda环境中都安装jupyter吗?答案是不需要,只需在base环境中安装jupyter,其余的环境中只需要ipykernel就可以。
以下是具体步骤,在这之前,base环境中应当已经安装了jupter。
1.激活对应环境
conda activate EnvName
2.在对应环境下安装ipykernel
conda install ipykernel
3.将 环境 写入到notebook中
python -m ipykernel install --user --name EnvName --display-name "EnvName"
4.在base环境中重新开启 jupyter notebook 后台服务
conda deactivate
# 回到 base 环境:
conda activate base
# 重启 jupyter 服务:
jupyter notebook --allow-root --config=jupyter_notebook_config.py
现在新打开的notebook中就可以看到环境选择了。
边栏推荐
猜你喜欢
随机推荐
Radar data processing technology
Auto-created primary key used when not defining a primary key
开发技术-获取10分钟前的时间
Export El table as is to excel table
修改已经上线的小程序名称
Adobe Photoshop (PS) - script development - remove file bloated script
对多态的理解
clickhouse原生監控項,系統錶描述
《ClickHouse原理解析与应用实践》读书笔记(2)
个人开发的渗透测试工具Satania
《ClickHouse原理解析与应用实践》读书笔记(3)
你我他是谁
遇到“word在试图打开文件时遇到错误”怎么办?
FreeRTOS记录(九、一个裸机工程转FreeRTOS的实例)
. NETCORE redis geo type
“信任机器”为发展赋能
物联网僵尸网络Gafgyt家族与物联网设备后门漏洞利用
Personal developed penetration testing tool Satania
ICML2022 | 序列决策的效用理论
[original] unable to use the code dialog height and width to solve the screen problem







