Step 1: install python, example: Python 3.7.9
https://www.python.org/ftp/python/3.7.9/python-3.7.9-amd64.exe
Note: with windows 7 must update:
X64: https://download.microsoft.com/download/F/1/0/F106E158-89A1-41E3-A9B5-32FEB2A99A0B/Windows6.1-KB2533623-x64.msu
X86: https://download.microsoft.com/download/2/D/7/2D78D0DD-2802-41F5-88D6-DC1D559F206D/Windows6.1-KB2533623-x86.msu
Step 2: you can build your own command here: https://pytorch.org/#pip-install-pytorch
Example:
pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
Result:
C:\Users\Administrator>pip install torch===1.6.0 torchvision===0.7.0 -f https:// download.pytorch.org/whl/torch_stable.html Looking in links: https://download.pytorch.org/whl/torch_stable.html Collecting torch===1.6.0 Downloading https://download.pytorch.org/whl/cu102/torch-1.6.0-cp37-cp37m-win_ amd64.whl (1077.4 MB) |████████████████████████████████| 1077.4 MB 5.6 kB/s Collecting torchvision===0.7.0 Downloading https://download.pytorch.org/whl/cu102/torchvision-0.7.0-cp37-cp37 m-win_amd64.whl (1.1 MB) |████████████████████████████████| 1.1 MB 6.8 MB/s Requirement already satisfied: numpy in c:\users\administrator\appdata\local\pro grams\python\python37\lib\site-packages (from torch===1.6.0) (1.15.2) Collecting future Downloading future-0.18.2.tar.gz (829 kB) |████████████████████████████████| 829 kB 930 kB/s Requirement already satisfied: pillow>=4.1.1 in c:\users\administrator\appdata\l ocal\programs\python\python37\lib\site-packages (from torchvision===0.7.0) (6.2. 2) Building wheels for collected packages: future Building wheel for future (setup.py) ... done Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491062 sha256=cacf378e9e040cacdaf6012ab0bbad375fa1165b3c74392f6a865eb4c0f4151c Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\56\ b0\fe\4410d17b32f1f0c3cf54cdfb2bc04d7b4b8f4ae377e2229ba0 Successfully built future Installing collected packages: future, torch, torchvision Successfully installed future-0.18.2 torch-1.6.0 torchvision-0.7.0
Note:
* Download CUDA toolkit 10.2 here: https://developer.nvidia.com/cuda-10.2-download-archive?target_os=Windows&target_arch=x86_64
* CUDA 10.2.89 needs Nvidia Graphics Driver >=441.22
CUDA Toolkit | Toolkit Driver Version |
|
---|---|---|
Linux x86_64 Driver Version | Windows x86_64 Driver Version | |
CUDA 11.7 GA | >=515.43.04 | >=516.01 |
CUDA 11.6 Update 2 | >=510.47.03 | >=511.65 |
CUDA 11.6 Update 1 | >=510.47.03 | >=511.65 |
CUDA 11.6 GA | >=510.39.01 | >=511.23 |
CUDA 11.5 Update 2 | >=495.29.05 | >=496.13 |
CUDA 11.5 Update 1 | >=495.29.05 | >=496.13 |
CUDA 11.5 GA | >=495.29.05 | >=496.04 |
CUDA 11.4 Update 4 | >=470.82.01 | >=472.50 |
CUDA 11.4 Update 3 | >=470.82.01 | >=472.50 |
CUDA 11.4 Update 2 | >=470.57.02 | >=471.41 |
CUDA 11.4 Update 1 | >=470.57.02 | >=471.41 |
CUDA 11.4.0 GA | >=470.42.01 | >=471.11 |
CUDA 11.3.1 Update 1 | >=465.19.01 | >=465.89 |
CUDA 11.3.0 GA | >=465.19.01 | >=465.89 |
CUDA 11.2.2 Update 2 | >=460.32.03 | >=461.33 |
CUDA 11.2.1 Update 1 | >=460.32.03 | >=461.09 |
CUDA 11.2.0 GA | >=460.27.03 | >=460.82 |
CUDA 11.1.1 Update 1 | >=455.32 | >=456.81 |
CUDA 11.1 GA | >=455.23 | >=456.38 |
CUDA 11.0.3 Update 1 | >= 450.51.06 | >= 451.82 |
CUDA 11.0.2 GA | >= 450.51.05 | >= 451.48 |
CUDA 11.0.1 RC | >= 450.36.06 | >= 451.22 |
CUDA 10.2.89 | >= 440.33 | >= 441.22 |
CUDA 10.1 (10.1.105 general release, and updates) | >= 418.39 | >= 418.96 |
CUDA 10.0.130 | >= 410.48 | >= 411.31 |
CUDA 9.2 (9.2.148 Update 1) | >= 396.37 | >= 398.26 |
CUDA 9.2 (9.2.88) | >= 396.26 | >= 397.44 |
CUDA 9.1 (9.1.85) | >= 390.46 | >= 391.29 |
CUDA 9.0 (9.0.76) | >= 384.81 | >= 385.54 |
CUDA 8.0 (8.0.61 GA2) | >= 375.26 | >= 376.51 |
CUDA 8.0 (8.0.44) | >= 367.48 | >= 369.30 |
CUDA 7.5 (7.5.16) | >= 352.31 | >= 353.66 |
CUDA 7.0 (7.0.28) | >= 346.46 | >= 347.62 |
1 Comment
Windows: how to install U^2-Net HTTP server | Free Online Tutorials
(August 24, 2020 - 10:23 am)[…] How to install pytorch on Windows […]