当前位置:网站首页>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 .
边栏推荐
- 20220620 面试复盘
- Oracle trigger error report table or view does not exist
- JS enter three integers a, B and C, and sort them from large to small (two methods)
- Render values to corresponding text
- Native JS --- infinite scrolling
- 微信全文搜索技术优化
- mysql导入导出数据到excel表日期出现问题
- Geospatial search - > R tree index
- Flutter automatically disappears after receiving push
- Maximum number [abstract rules for abstract sorting]
猜你喜欢

剑指 Offer II 028. 展平多级双向链表

利用cmd(命令提示符)安装mysql&&配置环境
模块五(微博评论)
![[flask tutorial] flask development foundation and introduction](/img/c4/fb80fbe6b563e3b304d59623ef6465.jpg)
[flask tutorial] flask development foundation and introduction

Summer Ending

Using CMD (command prompt) to install MySQL & configure the environment
![[AI helps scientific research] fool drawing of loss curve](/img/38/5cb2a3d33a609dab3874215d5f7b5b.png)
[AI helps scientific research] fool drawing of loss curve

Optimal solution for cold start

Parse JSON format data and save it to entity class

出手即不凡,这很 Oracle!
随机推荐
Methods of strings in JS charat(), charcodeat(), fromcharcode(), concat(), indexof(), split(), slice(), substring()
515. Find Largest Value in Each Tree Row
2021-09-22
剑指 Offer 04. 二维数组中的查找
How to implement a high-performance load balancing architecture?
el-select clear 清空内容时触发事件
Serevlt初识
剑指 Offer II 025. 链表中的两数相加
1024水文
汇编标志位相关知识点(连)
Jupyter notebook theme font setting and automatic code completion
[data visualization] 360 ° teaching you how to comprehensively learn visualization - Part 1
JS uses the for loop in the function to insert and delete the array at the specified position
Module 5 (microblog comments)
JS picture switching (simple and practical)
The amount is verified, and two zeros are spliced by integers during echo
Spoken English - weak reading
Seven competencies required by architects
3+1保障:高可用系统稳定性是如何炼成的?
[flask tutorial] flask overview