当前位置: 首页 > news >正文

pytorch 离线安装

最近配torch 环境 官网命令安装老是断线,所以采用了离线安装方式,顺便写个博客,大家遇到同一问题可参考:

网址: https://download.pytorch.org/whl/torch_stable.html

1. 下载合适版本(比如我本机是cuda11.6)

torch-1.12.0+cu116-cp38-cp38-win_amd64.whl

torchaudio-0.12.0+cu116-cp38-cp38-win_amd64.whl

(注意下面的torchvision 要比torch 高一个版本,比如torch 是1.12, torchvison 要是0.13)

torchvision-0.13.0+cu116-cp38-cp38-win_amd64.whl   

如:

2.pip 安装(导航到三个轮子的根目录,然后cmd 激活虚拟环境执行以下命令)

pip install torch-1.12.0+cu116-cp38-cp38-win_amd64.whl
pip install torchaudio-0.12.0+cu116-cp38-cp38-win_amd64.whl

pip install path\to\torchvision-0.13.0+cu116-cp38-cp38-win_amd64.whl
 

3. 验证:

python -c "import torch; print(torch.__version__)"
python -c "import torchaudio; print(torchaudio.__version__)"
python -c "import torchvision; print(torchvision.__version__)"

成功


文章转载自:
http://bandoline.dxwdwl.cn
http://breach.dxwdwl.cn
http://boxwood.dxwdwl.cn
http://catatonia.dxwdwl.cn
http://albiness.dxwdwl.cn
http://chiller.dxwdwl.cn
http://booster.dxwdwl.cn
http://cardines.dxwdwl.cn
http://anachronistic.dxwdwl.cn
http://benzpyrene.dxwdwl.cn
http://cheers.dxwdwl.cn
http://adlet.dxwdwl.cn
http://boutique.dxwdwl.cn
http://bomber.dxwdwl.cn
http://burial.dxwdwl.cn
http://attractively.dxwdwl.cn
http://antiferroelectricity.dxwdwl.cn
http://bovid.dxwdwl.cn
http://catchpenny.dxwdwl.cn
http://avellan.dxwdwl.cn
http://airbus.dxwdwl.cn
http://autoalarm.dxwdwl.cn
http://besot.dxwdwl.cn
http://alcalde.dxwdwl.cn
http://cattle.dxwdwl.cn
http://billing.dxwdwl.cn
http://belial.dxwdwl.cn
http://beeb.dxwdwl.cn
http://bacteriolytic.dxwdwl.cn
http://brute.dxwdwl.cn
http://www.dtcms.com/a/107769.html

相关文章:

  • win11 设置 wsl2 ubuntu
  • 4 月 6 日 共赴香港|聚焦 Polkadot 为 Web3 云开拓的创新实践路径!
  • IGMP(Internet Group Management Protocol)与组播技术深度解析
  • 巧记英语四级单词 Unit1-2【晓艳老师版】
  • Spring笔记06-数据持久化
  • Cesium 核心思想及基础概念应用
  • 蓝桥杯高频考点——高精度(含C++源码)
  • Java服务端性能优化:从理论到实践的全面指南
  • Css径向渐变 - radial-gradient
  • 宽带空时波束形成算法原理及MATLAB仿真
  • 【每日算法】Day 16-1:跳表(Skip List)——Redis有序集合的核心实现原理(C++手写实现)
  • OkHttpHttpClient
  • 160. 相交链表
  • 分析sys高问题的方法总结
  • Scala相关知识学习总结3
  • Linux中引导和服务
  • 网络攻防快速入门笔记pwn | 02 栈溢出题型 | 2.2 ret2libc
  • cesium加载CTB生成的地形数据
  • 海康网络摄像机接入EasyGBS GB28181平台
  • python示例类
  • LeetCode Hot100 刷题笔记(6)—— 栈、堆
  • HTML表单
  • RabbitMQ技术方案分析
  • 【面试篇】JVM
  • 使用STM32CubeMX和Keil在STM32上创建并运行一个简单的FreeRTOS多任务程序
  • 前端面试常考算法题目详解
  • W3C XML Schema 活动
  • 物理备份工具Xtrabackup备份和恢复原理详解
  • GitHub 趋势日报 (2025年04月01日)
  • ★ Linux ★ 环境变量和程序地址空间