当前位置:网站首页>Pytorch environment preparation
Pytorch environment preparation
2022-04-22 05:56:00 【Children facing the street】
Catalog
Confirm that the is installed annaconda
Check that it is installed cuda
Configure it anaconda Mirror image
If you have any questions, please leave a message
Tool catalog
- python 3.x + anaconda Can be the latest
- CUDA 11.2 NVIDIA graphics card
- pycharm community Community Edition Just the latest
Tool is introduced
- anaconda python Package management tools Automatic download management tools for third-party software libraries
- cuda Parallel computing library for NVIDIA graphics card
- pycharm community Free community version python Code editing tools
Installation diagram
anaconda
Official address Anaconda | Anaconda Distribution
install anaconda It will be installed by itself python notes python3.x Backwards compatible , There is no problem installing the latest version

Pay attention to check Add to path route For ease of use conda This command
Confirm that the is installed annaconda
cmd conda --version If you can knock out conda This command indicates that it has been installed conda

cuda install
cuda Can only be installed in NVIDIA On the graphics card Choose the corresponding download according to your computer After downloading, click Install Close the security software during installation This tutorial installs cuda 11.2 ( notes : The screenshot version is 11.6.2)





Check that it is installed cuda
cmd nvcc -V Be careful V It's capital

pytorch install
Enter official website Start Locally | PyTorch Copy the red box Paste the cmd Be careful cmd Run as an administrator Y
Configure it anaconda Mirror image
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
Use domestic sources -c pytorch
conda install pytorch torchvision torchaudio cudatoolkit=11.3
Installed cuda The version should be consistent with that here


pycharm install
Official website Download PyCharm: Python IDE for Professional Developers by JetBrains
Community Edition personal learning is enough Double click installation New projects To configure pyhon conda Environmental Science

Code demonstration
import torch
print(torch.__version__)
print('gpu:',torch.cuda.is_available())

If you have any questions, please leave a message
版权声明
本文为[Children facing the street]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220537442661.html
边栏推荐
- LeetCode 2055. Plates between candles -- prefix and + interval mark
- LeetCode 99. Restore binary search tree -- medium order traversal + sorting
- 蓝桥杯冲刺——DFS
- 07- 运算符
- golang 合并两个有序的数组(笔试题)
- Reading package list Finished analyzing dependency tree of package. Reading status information Some packages cannot be installed after completion. If you are using an unstable distribution, this may b
- 通过设置关联菜单建立excel记账本
- Telbot load balancing settings
- Apple CMS custom docking WeChat official account
- 蓝桥杯31天冲刺 Day8
猜你喜欢

C語言--經典100題

《PyTorch深度学习实践》Lecture_10 卷积神经网络基础 CNN

LeetCode 1770. 执行乘法运算的最大分数 -- 区间DP

Complete knapsack problem

Redis: redis cli is not an internal or external command

Discounted split plane

蓝桥杯31天冲刺 Day8

LeetCode 514. The road of freedom -- dynamic programming

golang 把句中的每个单词的首字母变成大写(笔试题)

正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是 因为系统
随机推荐
马斯克更新微信推送(狗狗币)
0 / 1 knapsack problem (dynamic programming + dynamic programming optimization)
Langue C - 100 questions classiques
Apple CMS custom docking WeChat official account
Discounted split plane
LeetCode 514. 自由之路--动态规划
excel的相对引用和绝对引用
raspberry keras-ocr can‘t allocate memory in static TLS block
telbot负载均衡设置
蓝桥杯31天冲刺 Day8
Torch recurrent neural network nn. RNN () and torch nn. RNNCell()
layer关闭弹窗,刷新父页面
Telbot load balancing settings
Full Permutation (backtracking) template
LeetCode 1591. 奇怪的打印机 II --判断排序
0/1背包问题(动态规划+动规优化)
Complete knapsack problem
蓝桥杯31天冲刺 Day10
Coordinate conversion using Gaode map API: WGS84 → gcj02
uniapp:HBuilderX运行uniapp项目到夜神模拟器