当前位置:网站首页>Pytorch环境搭建
Pytorch环境搭建
2022-07-21 03:02:00 【ZhangTuTu丶】
1.创建环境
首先打开Anaconda 命令提示行,即打开Anaconda Prompt,
前面显示(base)说明已经进入Anaconda的基础环境,然后我们键入
conda create -n pytorch1_11 python=3.7
其中 pytorch1_11是我们创建环境的名称
python=3.7 是我们希望使用的python的版本
我们输入 y 进入下一步。
此时环境已经创建成功,我们可以输入conda activate pytorch1_11激活该环境。
此时已经进入pytorch的环境,我们可以输入pip list检查该环境中有那些包可用。
安装Pytorch
首先进入Pytorch官网
选择与自己版本对应的命令行输入即可
Package:表示包的安装方式,一般window下使用Conda就可以,Linux系统下可以考虑选择pip。
下面是cuda的版本,cuda版本一定要与显卡的型号对应(有些显卡不支持cuda),如果没有显卡或者只有集显,就选择CPU即可。
可以在任务管理器,性能栏查看具体的GPU型号。同时保证显卡驱动版本对应,在安装前最好能把显卡驱动升级到最高。
我们将安装指令复制,输入到刚刚准备好的环境中
一路向下就安装成功了。
最后如果想检验安装是否成功,可以在命令行窗口输入python进入python命令行,再依次输入:
import python
torch.cuda.is_available()
若显示Ture,则证明成功。
边栏推荐
- SuperMap iClient for OpenLayers图层组控制实现方法
- Banks are not Tangseng meat banks are solid barriers to financial security.
- Skills of manually traversing binary tree
- kubernetes的这几种存储卷,别再傻傻分不清了
- 【Pytorch】学习笔记(一)创建自己的数据集
- JWT(JSON Web Token) 认证 :目前最流行的跨域认证解决方案
- 目前最畅销的 10 个 NFT
- Synchronized lock range
- The risk control data (model) is not bothered because of the processing skills in this flow process
- The new red envelope cover platform can build the source code of the independent background of the sub station
猜你喜欢
高质量WordPress下载站模板5play主题源码
什么是 GameFi?
数字藏品如何实现版权保护
Postgresql源码(64)查询执行——子模块Executor(2)执行前的数据结构和执行过程
ESB combined with UMC cloud platform development instructions
Tutorial (7.0) 03 Forticlient EMS configuration and Management * forticlient EMS * Fortinet network security expert NSE 5
Huffman tree and Huffman coding test points
kubernetes的这几种存储卷,别再傻傻分不清了
Manual implementation of solving single source shortest path
Clickhouse Fundamentals
随机推荐
ACM training July 5
El table supports paging multiple selection
LeetCode - 前缀和与差分
软件测试面试题:详细的描述一个测试活动完整的过程。(供参考,本答案主要是瀑布模型的做法)
W10 system, how to adjust the application resolution
Interface idempotency
Huffman tree and Huffman coding test points
0715 today's song list one last kiss, exhausted
Uniapp dynamically sets the height of the placeholder (in conjunction with the createselectorquery method)
点亮第一个LED
在线问题反馈模块实战(九):实现图片上传功能(下)
Apple released watchos 8.7 with bug fixes and security updates
什么是 GameFi?
kubernetes的这几种存储卷,别再傻傻分不清了
下一代无线局域网--802.11n与传统11ag OFDM设备间的PHY互操作性
kubernetes的这几种存储卷,别再傻傻分不清了
Protocole TCP
The new red envelope cover platform can build the source code of the independent background of the sub station
bryntum gantt 5.0.6
Ardunio开发——I2C协议通讯——控制2x16LCD