Pytorch installation -- first download the corresponding whl file, and then install it locally. (100% success)

Pytorch installation under windows--download the corresponding whl file first, and then install it locally

AuthorRJ

1. Create environment (anaconda)

conda create -n torch37 python=3.7

2. Select the corresponding torch version (whl file)

https://download.pytorch.org/whl/torch_stable.html

3. Installation

3.1 View cuda

terminal input

nvidia-smi

Displayed as follows:
insert image description here

The CUDA version displayed on my computer is10.2

Choose what you need to installGPUVersion

here i choosetorch(1.7.0)

As shown in the figure below:
insert image description here
Click to download, the default path I save here is

C:\Users\rongjian\Downloads

3.2 Installation

insert image description here

(base) C:\Users\rongjian>conda activate torch37
(torch37) C:\Users\rongjian>cd C:\Users\rongjian\Downloads
(torch37) C:\Users\rongjian\Downloads>pip install "torch-1.7.0+cu110-cp37-cp37m-win_amd64.whl

Guess you like

Origin blog.csdn.net/laplacez/article/details/126685595