Pytorch与cuda版本问题与pyG安装

1.环境搭建

a.pytorch和cuda的问题

报错:

UserWarning: 
NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.
If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
RuntimeError: CUDA error: no kernel image is available for execution on the device

ref:知乎如何解决Pytorch的GPU driver is too old的问题?

  1. 卸载之前安装的pip uninstall

  1. 查看cuda版本:nvidia-smi

  1. 根据查看到的cuda版本到pytorch官网previous version找到合适的wheel

  1. 例如:pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113

  1. btw:如果需要安装pytorch-scatter之类的,如有版本要求,则需要先去pyg官网核对版本对应的previous wheel,两方确定后再决定下载torch的版本

b.pyg的问题

  1. 参见a.3.b

  1. 如需要更换版本,则需要先把之前的scatter之类先卸载,再重新安装

如果你还需要装geometric啥的,那就需要将原先的一些torch-scatter之类的包 先卸载掉,然后再去官网装
https://blog.csdn.net/weixin_39417324/article/details/122091582

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值