当前位置:网站首页>Configuring pytorch in win10 environment
Configuring pytorch in win10 environment
2022-06-25 12:59:00 【Lingtree】
utilize Anaconda To configure pytorch.
One , To configure cuda as well as cudnn(gpu Speed up )
( If not nvidia Video card , Only use CPU, Ignore this step )
Download it on the official website cuda as well as cudnn after , Start configuration cuda Environmental Science .
Two , install Anaconda
2.1 Download and install from the official website Anaconda.
Open from the start menu Anaconda Medium Anaconda Prompt, appear (base), Successful installation , as follows :

( Configuration failed. Please refer to the pit stepping record at the end of the article )
2.2 Configuration environment
After successful installation , Stay on top Anaconda Prompt On the page , Input
conda create -n pytorch python=3.8Then input y. Install the required packages .
next , We type in :
conda activate pytorchYou can see

The leftmost base, Turned into pytorch. It's in pytorch Compiler environment for .
2.3 pytorch Installation
stay pytorch Select our corresponding environment in the corresponding part of the official website .

Pytorch Build: General choice Stable( Stable version ).
Your OS:PC Operating system of .
Package: We are in anaconda Installation on , So choose Conda.
Language: choice Python.
Compute Platform: Here we need to configure according to the cuda To choose from .
win+r, Input cmd Call up the command line window . Input
nvcc -V
nvidia-smiCan view the current cuda edition .

In the bottom line (Run this Command) Then copy the corresponding command .
For the above figure, i.e :
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge When it's done , We are Anaconda Powershell prompt Copy the above command in the window .
Then input y. Wait for the installation to succeed .
( Slow speed 、 See pit record for failure )
2.4 Verify environment installation
close Anaconda Powershell prompt, Open it again , Again by order conda activate pytorch Get into pytorch Environmental Science .
Input in sequence :
python 
import torch
torch.cuda.is_available()
so , return Ture, explain cuda Installation successful , otherwise pytorch Only use cpu function .
3、 ... and , Record on pit
3.1 Above, 2.1 Partial tread pit
If a similar error is reported here :

Please check the system environment variable ,Path route . All variables must be written in sections , Out-of-service “;” Write it in one piece .
3.2 Above, 2.3 Installation failure encountered in 、 The speed is too slow .
(1) After reading many blogs, I suggest using Tsinghua mirror , But I tried many times and failed . For the first time, it was quickly installed CPU Version of , Cause the computer to reinstall and start all over again . It is recommended to download it on the official website , I put it at night , It will be installed in the morning . Try a few times more .
(2) Do not hang up during installation VPN, Inevitable failure , Or report a mistake . I wasted an afternoon because of this .
(3) to update conda command .
3.3 torch.cuda.is_available() return false Probable cause
(1) Check if there is GPU.
(2) Check CUDA as well as CUDNN Environmental Science 、 System Path Variable configuration .
(3) Check if the graphics card driver is up to date .
边栏推荐
- JSTL tag: fmt:formatdate tag format Chinese standard time or timestamp
- Resolution of PPT paper drawing
- yolov5训练使用的负样本图片
- 字节跳动Dev Better技术沙龙来啦!参与活动赢好礼,限时免费报名中!
- [Visio]平行四边形在Word中模糊问题解决
- [转]以终为始,详细分析高考志愿该怎么填
- torch. Tensor splicing and list (tensors)
- Seven competencies required by architects
- 5 kinds of viewer for browser
- You can't specify target table 'xxx' for update in from clause
猜你喜欢

Why are databases cloud native?
![[flask tutorial] flask development foundation and introduction](/img/c4/fb80fbe6b563e3b304d59623ef6465.jpg)
[flask tutorial] flask development foundation and introduction

The editor is used every day. What is the working principle of language service protocol?

3+1保障:高可用系统稳定性是如何炼成的?

Connect with the flight book and obtain the user information according to the userid

Online service emergency research methodology

更新pip&下载jupyter lab
![[Visio]平行四边形在Word中模糊问题解决](/img/04/8a1de2983d648e67f823b5d973c003.png)
[Visio]平行四边形在Word中模糊问题解决

Talk about 11 key techniques of high availability

1251- Client does not support authentication protocol MySql错误解决方案
随机推荐
JSTL tag: fmt:formatdate tag format Chinese standard time or timestamp
Using CMD (command prompt) to install MySQL & configure the environment
20220620 interview reply
Native JS --- infinite scrolling
Geospatial search: implementation principle of KD tree
You can't specify target table 'xxx' for update in from clause
剑指 Offer II 025. 链表中的两数相加
顺序表的折半查找法
Reload cuda/cudnn/pytorch
Meichuang was selected into the list of "2022 CCIA top 50 Chinese network security competitiveness"
2021-09-28
Match regular with fixed format beginning and fixed end
Baidu search stability analysis story
JS function exercises
Another night when visdom crashed
架构师必备的七种能力
Jenkins Pipeline使用
高性能负载均衡架构如何实现?
2021-10-21
聊聊高可用的 11 个关键技巧