问题背景
NVIDIA DGX Spark 内置了 CUDA 13.0。目前 PyTorch 官方提供的针对 CUDA 13.0 的 PyTorch 选择如下,但直接安装会失败:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
输入上述命令安装失败,显示 SSL 证书验证错误:
Could not fetch URL https://download.pytorch.org/whl/cu130/torch/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='download.pytorch.org', port=443): Max retries exceeded with url: /whl/cu130/torch/ (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1017)'))) - skipping
具体报错如下图所示:

经排查,原因为 SSL 证书连接异常。
解决方案
1. 查询兼容版本
通过 PyTorch Previous Versions 页面查询 CUDA 13.0 版本的 PyTorch,并结合 Anaconda 官方资源进行确认。查得 torch=2.9.1 版本相关资源:

2. 执行安装
根据查询结果,使用 conda-forge 通道安装:
conda install conda-forge::pytorch-gpu



