Cannot install pytorch with Given Pip command SSL error

when running the command from the Pytorch website i get an error during install

WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)'))': /whl/cu118/torch/
Could not fetch URL https://download.pytorch.org/whl/cu118/torch/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='download.pytorch.org', port=443): Max retries exceeded with url: /whl/cu118/torch/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1007)'))) - skipping
ERROR: Could not find a version that satisfies the requirement torch (from versions: none)
ERROR: No matching distribution found for torch

I believe this is due to a security block from my company. is there any other way to install pytorch with cuda support? I am able to install pip packages without errors if im not trying to access a URL.
EG: pip install numpy
throws no errors

python version 3.10.11
torch 2.6.0
cuda 11.8
windows 11

CC @malfet in case you would know if our cert is causing issues.

In that case there isn’t much one can do there. Trying talking to them and ask adding download.pytorch.org to the list of exceptions. Or perhaps there is a corporate proxy sever one can configure to allow access to more web-sites.

You can try building from source or installing anaconda package, whenever it becomes available.

1 Like