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__)"
相关推荐
SoulRoar.1 天前
WSL2 + Conda 环境下MinerU 4.x GPU 服务部署与 systemd 常驻指南
conda·wsl·文档解析·mineru
benjiangliu14 天前
恩培趣味计算机视觉-01-conda环境和Python库
开发语言·python·conda
weixin_4617694017 天前
conda create 创建容器 Failed to resolve ‘repo.anaconda.com‘问题
开发语言·python·conda·repo·网络问题·无法创建
饭来_22 天前
Ubuntu 中出现 CondaToSNonInteractiveError 的解决方法
ubuntu·conda·debug
emo_2b23 天前
Pycharm配置conda解释器时遇到的问题及解决方法
linux·pycharm·conda
Είναι η κοπέλα25 天前
llama.cpp 与 GGUF 格式:本地大模型的“裸引擎“
开发语言·人工智能·pytorch·python·conda
Είναι η κοπέλα1 个月前
显存计算与模型选择:你的显卡能跑多大的模型
人工智能·pytorch·python·开源·conda
天蓝蓝的本我1 个月前
conda日常用到的命令积累1-登录linux,安装pycharm
linux·pycharm·conda
Είναι η κοπέλα1 个月前
Python 虚拟环境:venv、conda 与 Python 版本选择全解
开发语言·python·conda
夏天拐跑了西瓜1 个月前
一文入门LangChain:从框架认知到构建你的第一个AI Agent
python·langchain·conda·agent