jupyter | jupyter使用conda虚拟环境

一. 首先创建虚拟环境&&进入到你已经搭建好的虚拟环境中
bash 复制代码
# 创建一个名为jupyter_test的conda虚拟环境
conda create -n jupyter_test python=3.7.5

# 进入/激活虚拟环境
conda activate jupyter_test
二. 安装jupyter(conda自带)和内核, 将环境添加进内核
bash 复制代码
pip install jupyter
pip install ipykernel  # 安装jupyter内核

# 添加虚拟环境到jupyter中
python -m ipykernel install --user --name 虚拟环境名 --display-name 在jupyter中显示的环境名称
三. 移除内核环境
bash 复制代码
jupyter kernelspec remove 环境名
四. 如果conda虚拟环境中第三方包发生了变化,需要将jupyter中的内核环境移除重新进行添加
1. 移除
bash 复制代码
jupyter kernelspec remove 环境名
2. 重新添加
bash 复制代码
# 添加虚拟环境到jupyter中
python -m ipykernel install --user --name 虚拟环境名 --display-name 在jupyter中显示的环境名称
相关推荐
程序员-Benothing4 小时前
Linux安全加固指南:账号、权限、服务、审计基线
linux·运维·安全
木子欢儿6 小时前
openconnect Linux客户端安装 以及开机自启和登录
linux·运维·服务器
..Dauntless..7 小时前
【Linux】文件系统(一)
linux·运维·服务器
GeW9 小时前
新质生产力路线图:从Linux到数据库,企业落地要点都在这
linux
IMPYLH9 小时前
Linux 系统备份与镜像
linux·服务器·网络
qetfw9 小时前
Bash 字符串处理:参数展开、序列与脚本执行方式
linux·开发语言·chrome·bash
hhwyqwqhhwy9 小时前
设备树之 provider 和 consumer
java·linux·前端
aaa最北边10 小时前
Linux 上的交叉编译
linux·运维·服务器
小张成长计划..11 小时前
【Linux】27:日志
linux·运维·服务器
别动我齐刘海11 小时前
机器人 C++ / 系统联调补强2——异常处理、Protobuf
linux·c++·人工智能·学习·算法·机器学习·机器人