conda 虚拟环境相关命令

创建虚拟环境

powershell 复制代码
conda create -n 虚拟环境名 python=版本号

查看所有的conda虚拟环境

powershell 复制代码
conda env list

进入虚拟环境

powershell 复制代码
conda activate 虚拟环境名

退出当前虚拟环境,回到base

powershell 复制代码
source deactivate

删除某个整个conda虚拟环境

powershell 复制代码
conda remove -n 虚拟环境名 --all

在conda虚拟环境中安装 安装包

先切换到需要安装的conda虚拟环境

powershell 复制代码
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

只在conda虚拟环境中装,不在pip环境中装

powershell 复制代码
conda install 包名

查看当前装了哪些包

先切换到需要安装的conda虚拟环境

查看pip中有哪些包:

powershell 复制代码
pip list

查看conda虚拟环境中有哪些包:

powershell 复制代码
conda list
相关推荐
孟健8 小时前
Karpathy 用 200 行纯 Python 从零实现 GPT:代码逐行解析
python
码路飞10 小时前
写了个 AI 聊天页面,被 5 种流式格式折腾了一整天 😭
javascript·python
曲幽13 小时前
FastAPI压力测试实战:Locust模拟真实用户并发及优化建议
python·fastapi·web·locust·asyncio·test·uvicorn·workers
chlk12316 小时前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑16 小时前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件17 小时前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
敏编程17 小时前
一天一个Python库:jsonschema - JSON 数据验证利器
python
前端付豪17 小时前
LangChain记忆:通过Memory记住上次的对话细节
人工智能·python·langchain
databook17 小时前
ManimCE v0.20.1 发布:LaTeX 渲染修复与动画稳定性提升
python·动效
深紫色的三北六号1 天前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移