Closed LucaMarconato closed 2 years ago
This is weird. I cannot reproduce it on my machine :(
Not sure what's causing it. Does it work when using the "old" method with pip<20.3
?
pip install torch-sparse==latest+cu102 -f https://pytorch-geometric.com/whl/torch-1.6.0.html
There also might be some caching issues. How about using pip
with --no-cache-dir
?
I have tested three scenarios:
conda clean --all
, maybe this contributed in changing the error message that I get now:
>>> from torch_geometric.data import Data, InMemoryDataset
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/site-packages/torch_geometric/__init__.py", line 2, in <module>
import torch_geometric.nn
File "/data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/site-packages/torch_geometric/nn/__init__.py", line 2, in <module>
from .data_parallel import DataParallel
File "/data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/site-packages/torch_geometric/nn/data_parallel.py", line 5, in <module>
from torch_geometric.data import Batch
File "/data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
from .data import Data
File "/data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/site-packages/torch_geometric/data/data.py", line 8, in <module>
from torch_sparse import coalesce, SparseTensor
File "/data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/site-packages/torch_sparse/__init__.py", line 12, in <module>
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
File "/home/l989o/.local/lib/python3.8/site-packages/torch/_ops.py", line 105, in load_library
ctypes.CDLL(path)
File "/data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/ctypes/__init__.py", line 369, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /data/l989o/miniconda3/envs/spatial_uzh_test/lib/python3.8/site-packages/torch_sparse/_version.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs
pip 20.2.4
and then running the old method, which if I am right is
pip install torch-scatter==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-sparse==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-cluster==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-spline-conv==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-${TORCH}.html
pip install torch-geometric
makes running from torch_geometric.data import Data, InMemoryDataset
without error.
--no-cache-dir
. and actually it works!Thanks for your help!
Awesome :)
🐛 Bug
For some reasons in my machine I can't install torch 1.7.0, so I am trying either to use torch_geometric with torch 1.6.0 or 1.5.0.
Both, unfortunately, don't work for meEdit: torch 1.6.0 works for me, but torch 1.5.0 no 😟 In the following I will describe the bug that I get with torch 1.5.0.To Reproduce
The versions are installed correctly, as confirmed by
I install torch geometric with
The installation goes smooth.
Nonetheless, when I run my torch code I get an error.
The code triggering the error:
The error:
Expected behavior
Torch geometric code should work. Until yesterday everything worked, but I had to delete my conda env and I didn't write down the versions that I was using. Now I can't create a working env anymore.
Environment
OS: RETTY_NAME="CentOS Linux 7 (Core)" Python version: 3.8.0 PyTorch version: 1.6.0 CUDA/cuDNN version: 10.2 GCC version: 7.2.0 How did you try to install PyTorch Geometric and its extensions (wheel, source): wheel Any other relevant information:
Additional context
Thanks for your help!