Cannot import torch-spline-conv when installed from pip wheel in Torch 1.9.0 and CUDA 11.1
See original GitHub issue📚 Installation
I had been able install all pytorch-geometric related packages via pip prior to the new 1.7.1 release and it all works well. However, with the new release, pip install
seems to skip “building the wheel” for torch-spline-conv, but still give a successful installation. When importing the torch-spline-conv, it then gives this error:
—> 46 from torch_geometric.nn import MetaPath2Vec
/opt/anaconda3/lib/python3.7/site-packages/torch_geometric/nn/init.py in <module> 3 from .data_parallel import DataParallel 4 from .reshape import Reshape ----> 5 from .conv import * # noqa 6 from .norm import * # noqa 7 from .glob import * # noqa
/opt/anaconda3/lib/python3.7/site-packages/torch_geometric/nn/conv/init.py in <module> 22 from .point_conv import PointConv 23 from .gmm_conv import GMMConv —> 24 from .spline_conv import SplineConv 25 from .nn_conv import NNConv, ECConv 26 from .cg_conv import CGConv
/opt/anaconda3/lib/python3.7/site-packages/torch_geometric/nn/conv/spline_conv.py in <module> 12 13 try: —> 14 from torch_spline_conv import spline_basis, spline_weighting 15 except ImportError: 16 spline_basis = None
/opt/anaconda3/lib/python3.7/site-packages/torch_spline_conv/init.py in <module> 10 for library in [‘_version’, ‘_basis’, ‘weighting’]: 11 torch.ops.load_library(importlib.machinery.PathFinder().find_spec( —> 12 f’{library}{suffix}’, [osp.dirname(file)]).origin) 13 14 if torch.cuda.is_available(): # pragma: no cover
/opt/anaconda3/lib/python3.7/site-packages/torch/_ops.py in load_library(self, path) 102 # static (global) initialization code in order to register custom 103 # operators with the JIT. –> 104 ctypes.CDLL(path) 105 self.loaded_libraries.add(path) 106
/opt/anaconda3/lib/python3.7/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error) 362 363 if handle is None: –> 364 self._handle = _dlopen(self._name, mode) 365 else: 366 self._handle = handle
OSError: /lib64/libm.so.6: version `GLIBC_2.27’ not found (required by /opt/anaconda3/lib/python3.7/site-packages/torch_spline_conv/_basis_cuda.so)
Environment
- OS: Centos 7
- Python version: 3.7
- PyTorch version: 1.9
- CUDA/cuDNN version: 11.1
- GCC version: 6.3.0
- How did you try to install PyTorch Geometric and its extensions (wheel, source): wheel
- Any other relevant information:
CUDA=“cu111” pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.9.0+${CUDA}.html pip install torch-sparse -f https://pytorch-geometric.com/whl/torch-1.9.0+${CUDA}.html pip install torch-cluster -f https://pytorch-geometric.com/whl/torch-1.9.0+${CUDA}.html pip install torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.9.0+${CUDA}.html
Checklist
- I followed the installation guide.
- I cannot find my error message in the FAQ.
- I set up CUDA correctly and can compile CUDA code via
nvcc
. - I do have multiple CUDA versions on my machine.
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (10 by maintainers)
Top GitHub Comments
FYI, it seems that this issue persists with torch 1.11.0, however uninstalling
torch-spline-conv
solves the problem.I’d like to reopen this issue since building from source doesn’t fix the underlying problem of the wheels. It doesn’t seem to be a CUDA version specific issue, since I’ve experienced the same with CUDA 10.2. Moreover, I’ve tested it with several python versions, from
3.7
to3.9
, but without success.Reproducibility
Pytorch and dependencies installed with
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
torch-spline-conv
installed with:Python output
The bug only shows up in a CUDA capable machine. Importing the module on a machine without CUDA support works fine. I’ll be happy to report additional details as well as submit this issue on the official
torch-spline-conv
repository.