Skip to content

Commit d4a03b5

Browse files
authored
v3.4
1 parent 74c7f8a commit d4a03b5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/setup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,19 @@ def manual_installation_confirmation():
5555
return True
5656

5757
def install_pytorch(cuda_version, cuda_installed):
58+
major, minor = map(int, sys.version.split()[0].split('.')[:2])
5859
if cuda_installed:
5960
if cuda_version == "11.8":
60-
os.system("pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118")
61-
else:
62-
os.system("pip install torch torchvision torchaudio")
61+
if major == 3 and minor == 11:
62+
os.system("pip install https://download.pytorch.org/whl/cu118/torch-2.1.2%2Bcu118-cp311-cp311-win_amd64.whl#sha256=623af3c2b94c58951b71e247f39b1b7377cc94d13162a548c59ed9cf81b2b0b2")
63+
os.system("pip install https://download.pytorch.org/whl/cu118/torchvision-0.16.2%2Bcu118-cp311-cp311-win_amd64.whl#sha256=036391a65f3c2ac6dbe4b73ea0acc303dd1c0a667e2a3592a194b2d2db377da1")
64+
os.system("pip install https://download.pytorch.org/whl/cu118/torchaudio-2.1.2%2Bcu118-cp311-cp311-win_amd64.whl#sha256=598e885648ac94c24920104f185e72fe9f4a9519c2d29b009e47cbc0866e6244")
65+
elif major == 3 and minor == 10:
66+
os.system("pip install https://download.pytorch.org/whl/cu118/torch-2.1.2%2Bcu118-cp310-cp310-win_amd64.whl#sha256=0ddfa0336d678316ff4c35172d85cddab5aa5ded4f781158e725096926491db9")
67+
os.system("pip install https://download.pytorch.org/whl/cu118/torchvision-0.16.2%2Bcu118-cp310-cp310-win_amd64.whl#sha256=689f2458e8924c47b7ba9f50dca353423b75214184b905d540f69d9b962b2fdf")
68+
os.system("pip install https://download.pytorch.org/whl/cu118/torchaudio-2.1.2%2Bcu118-cp310-cp310-win_amd64.whl#sha256=0d02bc0336ee4b3553f0d13f88f61121db2fc21de7b147f4957ecdbcc1dc1c89")
69+
else:
70+
os.system("pip install torch torchvision torchaudio")
6371

6472
def setup_windows_installation():
6573
if not check_python_version_and_confirm():

0 commit comments

Comments
 (0)