我是 pytorch geometry 的新手,尝试将其安装到我的计算机上但失败了,所以我尝试在 Google Colab 上运行代码。根据上一个问题(这对我没有帮助,我不确定是不是同样的问题):
Google Colab 上的 PyTorch Geometric CUDA 安装问题
我做了:
!pip install --upgrade torch-scatter
!pip install --upgrade torch-sparse
!pip install --upgrade torch-cluster
!pip install --upgrade torch-spline-conv
!pip install torch-geometric
!pip install torch-cluster==latest+cu101 -f https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.4.0.html
!pip install torch-scatter==latest+cu101 torch-sparse==latest+cu101 torch-spline-conv==latest+cu101 -f https://s3.eu-central-1.amazonaws.com/pytorch-geometric.com/whl/torch-1.4.0.html
Run Code Online (Sandbox Code Playgroud)
他们打印:
Successfully installed torch-cluster-1.5.4
Successfully installed torch-scatter-2.0.4 torch-sparse-0.6.1 torch-spline-conv-1.2.0
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试运行时
import torch_geometric.datasets as datasets
Run Code Online (Sandbox Code Playgroud)
我得到:
RuntimeError: Detected that PyTorch and torch_sparse were compiled with different CUDA versions. PyTorch has CUDA version 10.1 and torch_sparse …
Run Code Online (Sandbox Code Playgroud)