搭建GPU版本PyTorch的两个坑

张开发
2026/6/10 5:35:04 15 分钟阅读
搭建GPU版本PyTorch的两个坑
1、装cuda前先看看有无对应版本的PyTorch我先装了cuda12.9装完后才发现没有对应版本的PyTorch。于是卸载重装cuda,浪费了不少时间。2、先装了cpu版本的PyTorch可能装不上GPU版本的PyTorch我电脑里原来装了cpu版本的PyTorch再用pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu128装GPU版本的PyTorch怎么都不行。只能先卸载cpu版再装GPU版的就装上了。

更多文章