Error installing PyTorch for CUDA 12.9 (pip version)

The problem is that installing PyTorch via the terminal was not successful. Here is the command that allows you to install via terminal: pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129

After a long download of about 2 GB, an error appears:
The error looks like this: ERROR: Could not install packages due to an OSError: [WinError 32] Процесс не может получить доступ к файлу, так как этот файл занят другим процессом: ‘C:\Users\Пользователь\AppData\Local\Temp\pip-unpack-d4xj4kg5\torch-2.9.0.dev20250725+cu129-cp310-cp310-win_amd64.whl’

Tell me what is the essence of the problem and how to fix it? Version CUDO 12.9

1 Like

What does the error message say?

1 Like

The text only contains one error, written above: ERROR: Failed to install packages due to OS error: [WinError 32] The process cannot access the file because the file is in use by another

process: “C:\Users\User\AppData\Local\Temp\pip-unpack-d4xj4kg5\torch-2.9.0.dev20250725+cu129-cp310-cp310-win_amd64.whl”

The thing is that when installing via a regular network, it does not want to save at all, and via connecting and changing the IP address of another country - it is configured, but to see if there is a network outage, then the download via pip crashes and records an error. Instead, I tried to download the PyTorch version on CUDO 12.4 - they were still there. My Internet is not bad, I turned off the firewall and antivirus - nothing helped. At different stages of loading it was reset due to wireless Internet, apparently the VPN was turned on. Tell me some other ways to download the version for CUDO 12.9, or solve the problem?

1 Like

I haven’t seen this issue before but it seems to indicate an environment issue. Based on the latest screenshot it seems you were able to install the nightly now.

The last screenshot is the first screenshot, and the first with a full description is already the second, sorry for the mess! But does PyTorch for CUDO 12.9 weigh about 7 gb? And in two files - as you can see in the screenshots

1 Like

No, the PyTorch build for Windows is around ~3GB as it ships all dependencies in the same wheel.

Yes, that’s normal. Why he downloaded two files then remains a mystery, but their weight was about the same, one was just 17 MB smaller. And by the way, about the hardware - this is a laptop designed for games with a 4060 video card, maybe it just can’t handle tasks via pip?