windows 7 sp1 运行 PyTorch 错误解决方案
OSError: [WinError 127] 找不到指定的程序。 Error loading "Python38\lib\site-packages\torch\lib\shm.dll" or one of its dependencies.
最新版本 PyTorch (>=1.10) 不支持 Windows 7,建议安装 PyTorch 1.9.1 或更早版本:
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
或者 CPU 版本(无 CUDA):
pip install torch==1.9.1+cpu torchvision==0.10.1+cpu torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
ONNX Runtime 1.13 及以上 不再支持 Windows 7,建议安装 1.12 版本:
pip uninstall onnxruntime -y pip install onnxruntime==1.12.1
升级pip
python -m pip install --upgrade pip
pip设置为国内镜像:
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple