Torch_geometric installation issue with Colab

D_Xu: <p>I followed this <a href="https://colab.research.google.com/drive/1h3-vJGRVloF5zStxL5I0rSy4ZUPNsjy8?usp=sharing" rel="noopener nofollow ugc">colab notebook</a> to install torch_geometric to Google Colab:<br>
(I turned on the GPU of the notebook and ensured the version of torch and Cuda is 1.9.0+cu102)</p>
<pre><code class="lang-auto">!pip install -q torch-scatter -f https://pytorch-geometric.com/whl/torch-1.9.0+cu102.html
!pip install -q torch-sparse -f https://pytorch-geometric.com/whl/torch-1.9.0+cu102.html
!pip install -q torch-geometric
</code></pre>
<p>And it appeared to be successful:</p>
<pre><code class="lang-auto">Looking in links: https://pytorch-geometric.com/whl/torch-1.9.0+cu102.html
Requirement already satisfied: torch-scatter in /usr/local/lib/python3.7/dist-packages (2.0.7)
Looking in links: https://pytorch-geometric.com/whl/torch-1.9.0+cu102.html
Requirement already satisfied: torch-sparse in /usr/local/lib/python3.7/dist-packages (0.6.10)
Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from torch-sparse) (1.4.1)
Requirement already satisfied: numpy&gt;=1.13.3 in /usr/local/lib/python3.7/dist-packages (from scipy-&gt;torch-sparse) (1.19.5)
Requirement already satisfied: torch-geometric in /usr/local/lib/python3.7/dist-packages (1.7.2)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (2.4.7)
Requirement already satisfied: networkx in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (2.5.1)
Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (1.1.5)
Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (1.4.1)
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (0.22.2.post1)
Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (4.41.1)
Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (2.23.0)
Requirement already satisfied: rdflib in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (5.0.0)
Requirement already satisfied: googledrivedownloader in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (0.4)
Requirement already satisfied: python-louvain in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (0.15)
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (1.19.5)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.7/dist-packages (from torch-geometric) (2.11.3)
Requirement already satisfied: MarkupSafe&gt;=0.23 in /usr/local/lib/python3.7/dist-packages (from jinja2-&gt;torch-geometric) (2.0.1)
Requirement already satisfied: decorator&lt;5,&gt;=4.3 in /usr/local/lib/python3.7/dist-packages (from networkx-&gt;torch-geometric) (4.4.2)
Requirement already satisfied: pytz&gt;=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas-&gt;torch-geometric) (2018.9)
Requirement already satisfied: python-dateutil&gt;=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas-&gt;torch-geometric) (2.8.1)
Requirement already satisfied: six&gt;=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil&gt;=2.7.3-&gt;pandas-&gt;torch-geometric) (1.15.0)
Requirement already satisfied: isodate in /usr/local/lib/python3.7/dist-packages (from rdflib-&gt;torch-geometric) (0.6.0)
Requirement already satisfied: idna&lt;3,&gt;=2.5 in /usr/local/lib/python3.7/dist-packages (from requests-&gt;torch-geometric) (2.10)
Requirement already satisfied: certifi&gt;=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests-&gt;torch-geometric) (2021.5.30)
Requirement already satisfied: chardet&lt;4,&gt;=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests-&gt;torch-geometric) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,&lt;1.26,&gt;=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests-&gt;torch-geometric) (1.24.3)
Requirement already satisfied: joblib&gt;=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn-&gt;torch-geometric) (1.0.1)
</code></pre>
<p>However, when I import the torch_geometric or its dependency, torch_sparse, I received the error:</p>
<pre><code class="lang-auto">OSError: /usr/local/lib/python3.7/dist-packages/torch_sparse/_convert_cuda.so: undefined symbol: _ZNK2at6Tensor6deviceEv
</code></pre>
<p>How can I fix it? I believe this <a href="https://discuss.pytorch.org/t/colab-not-working/121888">unsolved post</a> is facing the same issue.<br>
I guess it might be due to the early installation with the wrong version. If so, how should I delete it and reinstall the corrected one?<br>
Any advice would be highly appreciated.</p>