使用和管理jupyter notebook, anaconda环境下在jupyter使用自己创建的虚拟环境,怎么删除jupyter其他内核

引言:我有GPU,之前也下载了cuda,但是在jupyter中不能使用gpu,原因是我下载的cuda在另一个虚拟环境pytorch中,但是pytorch这个虚拟环境没有加到jupyter的内核中,怎么在jupyter使用自己创建的虚拟环境看二.anaconda环境下在jupyter使用自己创建的虚拟环境。

一.使用和管理虚拟环境

首先运行Anaconda Prompt:

1.检验当前conda的版本

复制代码
conda -V

2.创建虚拟环境:

复制代码
conda create -n  env_name python=x.x

#同时可以安装指定库

复制代码
conda create -n env_name numpy matplotlib python=3.6

env_name 为虚拟环境名称,x.x为虚拟环境python的版本,根据需求来定。

3.激活虚拟环境

复制代码
conda activate env_name

4.退出虚拟环境

复制代码
conda deactivate env_name

5.查看已有的虚拟环境

复制代码
conda env list  或 conda info -e

6.anaconda从其他环境切换到base环境:

复制代码
activate root

传送门:Anaconda创建虚拟环境并使用Jupyter-notebook打开虚拟环境(开搞开搞)_anaconda创建环境之后jupyter notebook-CSDN博客

二.anaconda环境下在jupyter使用自己创建的虚拟环境

传送门:win10 anaconda环境下在jupyter使用自己创建的虚拟环境-CSDN博客

三.怎么删除jupyter其他内核?

  • 查看 Jupyter notebook kernel

    jupyter kernelspec list

  • 删除 jupyter 内核

    jupyter kernelspec remove kernelname

传送门:怎么删除jupyter其他内核? - Python基础教程

相关推荐
用户83562907805111 小时前
无需 Office:Python 批量转换 PPT 为图片
后端·python
markfeng813 小时前
Python+Django+H5+MySQL项目搭建
python·django
GinoWi14 小时前
Chapter 2 - Python中的变量和简单的数据类型
python
JordanHaidee14 小时前
Python 中 `if x:` 到底在判断什么?
后端·python
ServBay14 小时前
10分钟彻底终结冗长代码,Python f-string 让你重获编程自由
后端·python
闲云一鹤14 小时前
Python 入门(二)- 使用 FastAPI 快速生成后端 API 接口
python·fastapi
Rockbean15 小时前
用40行代码搭建自己的无服务器OCR
服务器·python·deepseek
曲幽16 小时前
FastAPI + Ollama 实战:搭一个能查天气的AI助手
python·ai·lora·torch·fastapi·web·model·ollama·weatherapi
用户606487671889617 小时前
国内开发者如何接入 Claude API?中转站方案实战指南(Python/Node.js 完整示例)
人工智能·python·api
只与明月听17 小时前
RAG深入学习之Chunk
前端·人工智能·python