OSError: libc10_cuda.so: cannot open shared object file: No such file or directory
See original GitHub issue📚 Installation
Environment
- OS:Red Hat Enterprise Linux Server release 7.4
- Python version:Python 3.7.9
- PyTorch version:1.7.1
- CUDA/cuDNN version:10.1
- GCC version:GCC 7.3.0
- How did you try to install PyTorch Geometric and its extensions (wheel, source): pip install torch-scatter -f https://data.pyg.org/whl/torch-1.7.1+cu101.html pip install torch-sparse -f https://data.pyg.org/whl/torch-1.7.1+cu101.html pip install torch-geometric
- Any other relevant information:
Checklist
- [yes ] I followed the installation guide.
- [ yes] I cannot find my error message in the FAQ.
- [yes ] I set up CUDA correctly and can compile CUDA code via
nvcc
. - [ no] I do have multiple CUDA versions on my machine.
Additional context
i try to import torch_geometric,the error is :OSError: libc10_cuda.so: cannot open shared object file: No such file or directory. detail: Traceback (most recent call last): File “test_and_visulise.py”, line 8, in <module> from models.gat_gcn import GAT_GCN File “/home/qmy/cyp/models/gat_gcn.py”, line 5, in <module> from torch_geometric.nn import GCNConv, GATConv, GINConv, global_add_pool File “/home/qmy/anaconda3/envs/deeplearning/lib/python3.7/site-packages/torch_geometric/init.py”, line 7, in <module> import torch_geometric.data File “/home/qmy/anaconda3/envs/deeplearning/lib/python3.7/site-packages/torch_geometric/data/init.py”, line 1, in <module> from .data import Data File “/home/qmy/anaconda3/envs/deeplearning/lib/python3.7/site-packages/torch_geometric/data/data.py”, line 3, in <module> from torch_geometric.typing import OptTensor, NodeType, EdgeType File “/home/qmy/anaconda3/envs/deeplearning/lib/python3.7/site-packages/torch_geometric/typing.py”, line 4, in <module> from torch_sparse import SparseTensor File “/home/qmy/anaconda3/envs/deeplearning/lib/python3.7/site-packages/torch_sparse/init.py”, line 13, in <module> library, [osp.dirname(file)]).origin) File “/home/qmy/anaconda3/envs/deeplearning/lib/python3.7/site-packages/torch/_ops.py”, line 110, in load_library ctypes.CDLL(path) File “/home/qmy/anaconda3/envs/deeplearning/lib/python3.7/ctypes/init.py”, line 364, in init self._handle = _dlopen(self._name, mode) OSError: libc10_cuda.so: cannot open shared object file: No such file or directory
i can’t find the libc10_cuda.so in my usr/local/lib/ , but i can find libcudart.so and libcudart.so.10.1.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:9 (1 by maintainers)
Top GitHub Comments
Weirdly my solution above stopped working again for me. I found success with the following:
then
For those who run into this error again, I solved it by starting in a fresh environment and first installing pyg using:
then, installing a cuda enabled version of pytorch
This first installs a CPU enabled version of torch in the first line and then replaces it with a GPU enabled version of torch. For whatever reason this was the only way I could resolve the error.