conda相关操作

安装torch

直接使用conda install torch==1.12.0会报错,因为 Conda 通常使用 pytorch 作为包名(而非 torch)
正确使用方法:

bash 复制代码
conda install pytorch==1.12.0 -c pytorch

使用 pip 安装

bash 复制代码
pip install torch==1.12.0

在 Conda 中查看可安装的 PyTorch 版本,可以通过以下几种方法实现:

  • 使用 conda search 查询
bash 复制代码
conda search pytorch -c pytorch
  • 或指定更多渠道:
bash 复制代码
conda search pytorch -c pytorch -c conda-forge
# 例如:conda search pytorch -c pytorch -c pytorch

查看已安装版本

bash 复制代码
python -c "import torch; print(torch.__version__)"
相关推荐
jiayi_19999 小时前
Linux 容器安装 conda 和 pip
linux·conda·pip
ydl11282 天前
安装Anaconda
人工智能·conda
郁大锤2 天前
conda虚拟环境占用空间太多,如何清理?
linux·conda
be_humble2 天前
conda 环境配置
conda
课堂随想5 天前
vscode关闭自动激活conda环境
vscode·conda
人工智能训练6 天前
在 Ubuntu 系统中利用 conda 创建虚拟环境安装 sglang 大模型引擎的完整步骤、版本查看方法、启动指令及验证方式
linux·运维·服务器·人工智能·ubuntu·conda·sglang
Will_Ye6 天前
在Ubuntu中使用Docker打包程序(Conda, pip)
ubuntu·docker·conda
我狸才不是赔钱货6 天前
Python的“环境之殇”:从Venv到Conda的终极抉择
开发语言·python·conda
被放养的研究生7 天前
conda常用命令
conda
开心-开心急了8 天前
conda 命令使用进阶指南 minconda
conda·1024程序员节·minconda