pytorch_geometric: libcudart.so.10.0 ERROR
I could install it successfully, but when I tried
from torch_geometric.data import Data
,
there would be an error:
ImportError: libcudart.so.10.0: cannot open shared object file: No such file or directory
The complete error message is below:
>>> from torch_geometric.data import Data
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/bob/anaconda3/envs/torch_cu100/lib/python3.7/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
from .data import Data
File "/home/bob/anaconda3/envs/torch_cu100/lib/python3.7/site-packages/torch_geometric/data/data.py", line 2, in <module>
from torch_geometric.utils import (contains_isolated_nodes,
File "/home/bob/anaconda3/envs/torch_cu100/lib/python3.7/site-packages/torch_geometric/utils/__init__.py", line 2, in <module>
from .scatter import scatter_
File "/home/bob/anaconda3/envs/torch_cu100/lib/python3.7/site-packages/torch_geometric/utils/scatter.py", line 1, in <module>
import torch_scatter
File "/home/bob/anaconda3/envs/torch_cu100/lib/python3.7/site-packages/torch_scatter/__init__.py", line 3, in <module>
from .mul import scatter_mul
File "/home/bob/anaconda3/envs/torch_cu100/lib/python3.7/site-packages/torch_scatter/mul.py", line 3, in <module>
from torch_scatter.utils.ext import get_func
File "/home/bob/anaconda3/envs/torch_cu100/lib/python3.7/site-packages/torch_scatter/utils/ext.py", line 5, in <module>
import torch_scatter.scatter_cuda
ImportError: libcudart.so.10.0: cannot open shared object file: No such file or directory
I installed CUDA-9.0 and CUDA-10.0 on my PC, and used a symlink pointing cuda package from /usr/local/cuda-10.0/
to /usr/local/cuda/
. I wondered if it may cause the error.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 19 (10 by maintainers)
Commits related to this issue
- Revisit `MetaPath2Vec` (#114) * revisit metapath2vec * update * typo * update * fix doc * update * check for attributes rather than key — committed to pyg-team/pytorch_geometric by rusty1s 3 years ago
- Heterogeneous Graph Support + GraphGym (#3068) * added HGT DBLP example * typo * Merge PyG master (#52) * Adding the Facebok Page-Page dataset * type hints * documentation CI * py 3... — committed to pyg-team/pytorch_geometric by rusty1s 3 years ago
I have done it and my PyTorch is working all well.
Did you modify
LD_LIBRARY_PATH
to point to CUDA 10?Thanks for your reply. It may be the problem you mentioned above. I tested as you mentioned:
I guess there is something wrong with CUDA version. However, I don’t know how to compile Pytorch with its corresponding CUDA version. May you give me some help? Thanks. I tried my way, delete the original symlink and point
/usr/local/cuda-9.0
to/usr/local/cuda
, but it did not work.Did you compile both PyTorch and its extensions with the same CUDA version? You can check this via torch.version.cuda
Fix it.
torch-scatter
seems to constantly find *.so files fromAnd there are CUDA 9.0 10.0 and 10.1 on my server.
/usr/local/cuda/lib64
is originally set to link CUDA 9.0. Though my~/.bashrc
has set to link/usr/local/cuda-10.0/lib64
forLD_LIBRARY_PATH
. The installation still finds/usr/local/cuda/lib64
.So I just remove
/usr/local/cuda
, copy/usr/local/cuda-10.0
and rename it as/usr/local/cuda
, without changing anything in~/.bashrc
. Uninstall and reinstall. Fix it.And then
torch-sparse
will cause anotherlibcusparse.so.10.0
problem. So I change lines in~/.bashrc
to point to/usr/local/cuda/
. And all things done.Maybe this helps?