Install pytorch (RTX2060+win10) based on anaconda

I used the Mi Gaming Notebook RTX2060

Based on anaconda, mainly refer to this article:

https://www.cnblogs.com/zhouzhiyao/p/11784055.html

1. Enter the command line and check the cuda version

 

 

2. Install cudnn, there are many tutorials, you need to register an account and fill in the questionnaire. Decompress, copy and paste, generally no major problems.

Reference: https://blog.csdn.net/zhangpengzp/article/details/85008507

3. Install python3.7

4. Install pytorch and use domestic mirror source, otherwise the speed is too slow

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda install pytorch torchvision cudatoolkit=10.1

5. Test

6. Install pychram, just use the community version

7. Choose conda environment in pycharm

 

8. To run the torch program in the pycharm environment, I use the Mofan python-pytorch routine. The import torch statement did not report an error, and you're done.

9. How to install some libraries

(1) You can choose to download directly in the anaconda navigator;

(2) It can be installed in anaconda prompt, such as sklearn.

 

Guess you like

Origin blog.csdn.net/cheweng4363/article/details/105720725