码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • pip install torch


    It is different from install torch with anaconda, there is a way to install torch with python.

    https://download.pytorch.org/whl/torch_stable.htmlicon-default.png?t=N7T8https://download.pytorch.org/whl/torch_stable.htmlOpen this page, then download the whl file that you need.

    For example, I choose three files named 

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

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

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

    You should pay attention to the num.

    Input the nvidia-smi you can see the version of your cuda.

    Find the right version of torch and the correct version of torchvision. There I choose cp39 because my python.version is 3.9. So you can choose 3.10 if your python.version is 3.10.

    ---------------------------------------------------

    torch         torchvision      python
    main/nightly    main/nightly    >=3.7,<=3.10
    1.13.0    0.14.0    >=3.7,<=3.10
    1.12.0    0.13.0    >=3.7, <=3.10
    1.11.0    0.12.0    >=3.7, <=3.10
    1.10.2    0.11.3    >=3.6, <=3.9
    1.10.1    0.11.2    >=3.6, <=3.9
    1.10.0    0.11.1    >=3.6, <=3.9
    1.9.1    0.10.1    >=3.6, <=3.9
    1.9.0    0.10.0    >=3.6, <=3.9
    1.8.2    0.9.2    >=3.6, <=3.9
    1.8.1    0.9.1    >=3.6, <=3.9
    1.8.0    0.9.0    >=3.6, <=3.9
    1.7.1    0.8.2    >=3.6, <=3.9
    1.7.0    0.8.1    >=3.6, <=3.8
    1.7.0    0.8.0    >=3.6, <=3.8
    1.6.0    0.7.0    >=3.6, <=3.8
    1.5.1    0.6.1    >=3.5, <=3.8
    1.5.0    0.6.0    >=3.5, <=3.8
    1.4.0    0.5.0    ==2.7, >=3.5, <=3.8
    1.3.1    0.4.2    ==2.7, >=3.5, <=3.7
    1.3.0    0.4.1    ==2.7, >=3.5, <=3.7
    1.2.0    0.4.0    ==2.7, >=3.5, <=3.7
    1.1.0    0.3.0    ==2.7, >=3.5, <=3.7
    <=1.0.1    0.2.2    ==2.7, >=3.5, <=3.7

    torch            torchaudio          python

    main / nightly main / nightly >=3.7, <=3.10

    1.12.0          0.12.0           >=3.7, <=3.10

    1.11.0          0.11.0           >=3.7, <=3.9

    1.10.0         0.10.0          >=3.6, <=3.9

    1.9.1           0.9.1           >=3.6, <=3.9

    1.9.0           0.9.0           >=3.6, <=3.9

    1.8.2           0.8.2           >=3.6, <=3.9

    1.8.1          0.8.1           >=3.6, <=3.9

    1.8.0           0.8.0          >=3.6, <=3.9

    1.7.1           0.7.2          >=3.6, <=3.9

    1.7.0           0.7.0           >=3.6, <=3.8

    1.6.0           0.6.0          >=3.6, <=3.8

    1.5.0           0.5.0          >=3.5, <=3.8

    1.4.0           0.4.0           ==2.7, >=3.5, <=3.8

    ----------------------------------------------------------------

    These are the versions you could shudy.

    You could open the cmd of your folder that you just download these files, then input your command.

    pip install torch-1.12.0+cu116-cp39-cp39-win_amd64.whl torchvision-0.13.0+cu116-cp39-cp39-win_amd64.whl torchaudio-0.12.0+cu116-cp39-cp39-win_amd64.whl

    There I just install like this:

    Test it:

    1. import torch
    2. print(torch.__version__)
    3. torch.cuda.is_available()

  • 相关阅读:
    NPM安装后报错:ERROR: npm v10.2.1 is known not to run on Node.js v10.24.1.
    VUE面试题总结2
    震感来袭,豆瓣评分9.9,万人血书的多线程与高并发v2.0版本
    【C++实战小项目】通讯录(二) 通讯录添加用户的模拟详解,多数组变化
    毕业设计 大数据房价数据分析及可视化 - python 房价分析
    Spring Boot (Vue3+ElementPlus+Axios+MyBatisPlus +Spring Boot 前后端分离)
    交通物流模型 | 基于自适应图卷积网络的轨道交通短时客流预测
    解决craco启动react项目卡死在Starting the development server的问题
    内核错误怎么解决?Win11系统内核错误解决方法
    全志V853 NPU 转换部署 YOLO V5 模型
  • 原文地址:https://blog.csdn.net/m0_72572822/article/details/132783328
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号