How to install pytorch v2.0.0 cuda 17 on my pc?

Hi there,
I have wanted to install Pytorch on my pc, but I couldn’t.
First, by this command, I have got lots of errors related to my connection.

pip3 install torch --index-url https://download.pytorch.org/whl/cu117

So, I decided to install it directly to download. Now, I download a file which is named “torch-2.0.0+cu117-cp310-cp310-win_amd64.whl” and I have a venv (virtual environment) for my project, but I don’t know how to connect this file to the project to import and use it.

Before that, I handled all the configs related to Cuda of my system, so I don’t have any problems with them.
Cuda:
This is some information about my PC:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Wed_Feb__8_05:53:42_Coordinated_Universal_Time_2023
Cuda compilation tools, release 12.1, V12.1.66
Build cuda_12.1.r12.1/compiler.32415258_0

Pip version: 21.2.3
Python version: Python 3.10.0 & 3.11.2
System type: 64-bit operating system
GPU: NVIDIA GeForce GTX 1650 Ti

Thanks a lot :slight_smile:

Your locally installed CUDA toolkit won’t be used by the PyTorch binaries as they ship with their own CUDA library dependencies. You would only need to install a proper NVIDIA driver.
Could you post the error message you were getting from the pip install command?

Hi,
Did I install a proper version of NVIDIA?
I put some information related to my laptop and this version of the toolkit was recommended to me.

I got this error:

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='download.pytorch.org', port=443): Read timed out. 

I don’t know what exactly you’ve installed but if applications can communicate with your GPU the driver installation might be alright.
The posted error message indicates a timeout so I would recommend either rerunning the same command or checking if e.g. a firewall is preventing the download.

How should I check that GPU can communicate with applications?
I think that’s ok because I have a driver in the device manager of my PC and also I can check the version of my NVIDIA toolkit. Thus, I installed all of them right.

For that error, I’ve tried many times but when the downloaded file reaches 1.7GB, it suddenly stops and gives me that error. I asked about this in some groups in my country, they said that was because of our connection.

So, if I want to install that downloaded file I mentioned earlier, I mean “torch-2.0.0+cu117-cp310-cp310-win_amd64.whl”, how can I do that?

Try to download it again from a better connection and save it for future installations.