Error installing PyTorch for CUDA 12.9 (pip version)

velskray: <p>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 <a href="https://download.pytorch.org/whl/nightly/cu129" rel="noopener nofollow ugc">https://download.pytorch.org/whl/nightly/cu129</a></p>
<p>After a long download of about 2 GB, an error appears:<br>
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’</p>
<p>Tell me what is the essence of the problem and how to fix it? Version CUDO 12.9</p>

ptrblck: <p>What does the error message say?</p>

velskray: <p>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</p>
<p>process: “C:\Users\User\AppData\Local\Temp\pip-unpack-d4xj4kg5\torch-2.9.0.dev20250725+cu129-cp310-cp310-win_amd64.whl”</p>
<p>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?</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/5/1/51ef5f37a281fce8e7fccc8c30fb4352003caccc.png" data-download-href="https://discuss.pytorch.org/uploads/default/51ef5f37a281fce8e7fccc8c30fb4352003caccc" title="11111"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51ef5f37a281fce8e7fccc8c30fb4352003caccc_2_690x371.png" alt="11111" data-base62-sha1="bGPwGhqNxc3bfpWcgkUpnHPUpgU" width="690" height="371" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51ef5f37a281fce8e7fccc8c30fb4352003caccc_2_690x371.png, https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51ef5f37a281fce8e7fccc8c30fb4352003caccc_2_1035x556.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/5/1/51ef5f37a281fce8e7fccc8c30fb4352003caccc_2_1380x742.png 2x" data-dominant-color="1F1E1E"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">11111</span><span class="informations">1920×1034 150 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

velskray: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/2/a/2a2428b9b13ef082a3554e17f60c93f2276b51de.png" data-download-href="https://discuss.pytorch.org/uploads/default/2a2428b9b13ef082a3554e17f60c93f2276b51de" title="2222"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2a2428b9b13ef082a3554e17f60c93f2276b51de_2_690x367.png" alt="2222" data-base62-sha1="60NwvayuEx37EzBrs1WHw7HZXY2" width="690" height="367" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2a2428b9b13ef082a3554e17f60c93f2276b51de_2_690x367.png, https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2a2428b9b13ef082a3554e17f60c93f2276b51de_2_1035x550.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/2/a/2a2428b9b13ef082a3554e17f60c93f2276b51de_2_1380x734.png 2x" data-dominant-color="151515"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">2222</span><span class="informations">1920×1023 62.1 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

ptrblck: <p>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.</p>

velskray: <p>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</p>

ptrblck: <aside class="quote no-group" data-username="velskray" data-post="6" data-topic="221831">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/velskray/48/77785_2.png" class="avatar"> velskray:</div>
<blockquote>
<p>But does PyTorch for CUDO 12.9 weigh about 7 gb?</p>
</blockquote>
</aside>
<p>No, the PyTorch build for Windows is around ~3GB as it ships all dependencies in the same wheel.</p>

velskray: <p>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?</p>