欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 房产 > 建筑 > 安装torch-geometric库

安装torch-geometric库

2025/9/22 16:42:33 来源:https://blog.csdn.net/m0_45447650/article/details/144735023  浏览:    关键词:安装torch-geometric库

目录

1.查看 torch 和 CUDA 版本

2.依次下载和 torch 和 CUDA 对应版本的四个依赖库pyg-lib、torch-scatter、torch-sparse、torch-cluster以及torch-spline-conv

3.下载并安装torch-geometric库


1.查看 torch 和 CUDA 版本

查看CUDA版本

nvcc -V

查看pytorch版本

pip show torch

2.依次下载和 torch 和 CUDA 对应版本的四个依赖库pyg-lib、torch-scatter、torch-sparse、torch-cluster以及torch-spline-conv

 网址: https://data.pyg.org/whl/

 根据自己的torch版本和CUDA选择

选择需要的版本,右键复制链接。

在命令行使用 wget 下载链接

wget -P 目标地址 https://data.pyg.org/whl/torch-2.0.0%2Bcu118/torch_sparse-0.6.18%2Bpt20cu118-cp310-cp310-linux_x86_64.whl

下载以上五个库的wheel文件之后,使用 pip install 安装

pip install wheel文件地址

3.下载并安装torch-geometric库

网址:PyG

 

根据自己的torch和cuda版本安装 torch-geometric库

pip install torch_geometric -f https://data.pyg.org/whl/torch-{torch版本号}+cu{CUDA版本号}.html
# pip install torch_geometric -f https://data.pyg.org/whl/torch-2.0.0+cu118.html

安装完成,无报错

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词