mac jupyter使用现有的python环境

mood:python 编程真的是在反复的与自己和解啊 本来超级的畏难情绪 读会儿书 计算机博士的书 感觉还是要坚强的。《研磨记》--一位博士生的回忆录 作者技术真的强啊

正文开始:

  • 聚焦搜索,打开终端
  • 激活虚拟环境:conda activate pytorch(我的虚拟环境是pytorch)
  • 安装ipykernal:conda install ipykernel
  • 本地环境注入jupyter

格式:

python 复制代码
python -m ipykernel install --user --name 本地环境名称 --display-name "在jupyter上显示的环境名称"

示例:

python -m ipykernel install --user --name pytorch --display-name "pytorch"

  • 终端继续输入:jupyter notebook

环境美美打开,结果美美运行

相关推荐
岁月宁静1 天前
五、《从零手撸 Agent》 — 什么是 Agent:从“会聊天”到“会做事”,差的就是一个循环
python·agent
梯度下降者1 天前
Python - 函数
python·高阶函数·可调用对象·functools·嵌套作用域
starzy19901 天前
深入理解Scala隐式参数:上下文流转
开发语言·python·scala
wuyk5551 天前
Spider-第16讲-线程池与竞态问题
大数据·爬虫·python·elasticsearch·搜索引擎
kyle~2 天前
FastAPI --- 将业务能力以 API 的形式提供给外部系统
python·fastapi·前后端
aiotto资源分享2 天前
Python 写 JSON 文件,程序中途退出会留下什么?
java·python·json·jsondecodeerror
梯度下降者2 天前
Python信号量,条件变量,事件学习
python·条件变量·事件·信号量·线程通信
MSTcheng.2 天前
【AI应用实战】用 FastAPI + SSE 做一个自己的 AI 聊天网页:流式输出、多轮对话与完整源码
人工智能·python·大模型·fastapi·sse·ai聊天助手
the局外人2 天前
Python 实战检索优化:BM25、向量与重排
数据库·后端·python
__underline__2 天前
冷门Python知识点006篇:Python 类体里的名字,能被"凭空造出来"
后端·python