OSError: libc10_cuda.so: cannot open shared object file: No such file or directory

See original GitHub issue

📚 Installation

Environment

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:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
sauhaardaccommented, Jul 30, 2022

Weirdly my solution above stopped working again for me. I found success with the following:

conda install pytorch==1.11.0 cudatoolkit=11.3 -c pytorch

then

conda install pyg -c pyg
4reactions
sauhaardaccommented, Jul 11, 2022

For those who run into this error again, I solved it by starting in a fresh environment and first installing pyg using:

conda install -q -y pyg -c pyg

then, installing a cuda enabled version of pytorch

conda install -q -y pytorch cudatoolkit=11.3 -c 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: libc10.so: cannot open shared object file: No such ...
libc10.so is made available by pytorch. Hence first import torch. and then import packages that depend on pytorch.
Read more >
When I import pytorch, ImportError: libc10.so: cannot open ...
Hello, ImportError: libc10.so: cannot open shared object file: No such file or directory What am I supposed to do? Thank you.
Read more >
【Pytorch】OSError: libc10_cuda.so: cannot open shared ...
【Pytorch】OSError: libc10_cuda.so: cannot open shared object file: No such file or directory. leeshutao 已于 2022-07-07 22:09:10 修改 2956 收藏 1.
Read more >
OSError: libcuda.so.1 - Questions - Apache TVM Discuss
Hi there, Does anyone why list below? ... _name, mode) OSError: libcuda.so.1: cannot open shared object file: No such file or directory.
Read more >
libcuda.so.1: cannot open shared object file
libcuda.so.1: cannot open shared object file: No such file or directory. Yeynno. # See where the link is pointing. ls ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found