pytorch_geometric icon indicating copy to clipboard operation
pytorch_geometric copied to clipboard

OSError: libcusparse.so.10

Open faziii0 opened this issue 1 year ago • 9 comments

🐛 Describe the bug

Traceback (most recent call last): File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/site-packages/torch_sparse/init.py", line 15, in library, [osp.dirname(file)]).origin) File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/site-packages/torch/_ops.py", line 106, in load_library ctypes.CDLL(path) File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: libcusparse.so.10: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "track_gnn.py", line 20, in from tracker.multitracker import GNNTracker File "/home/fazal/Downloads/MOT/GSDT-main/src/lib/tracker/multitracker.py", line 8, in from models.model import create_model, load_model File "/home/fazal/Downloads/MOT/GSDT-main/src/lib/models/model.py", line 9, in from .networks.pose_dla_dcn import get_pose_net_with_gnn as get_dla_dcn_gnn File "/home/fazal/Downloads/MOT/GSDT-main/src/lib/models/networks/pose_dla_dcn.py", line 14, in from torch_geometric.nn import GATConv, GraphConv, GCNConv, AGNNConv, EdgeConv File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/site-packages/torch_geometric/init.py", line 4, in import torch_geometric.data File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/site-packages/torch_geometric/data/init.py", line 1, in from .data import Data File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/site-packages/torch_geometric/data/data.py", line 3, in from torch_geometric.typing import OptTensor, NodeType, EdgeType File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/site-packages/torch_geometric/typing.py", line 4, in from torch_sparse import SparseTensor File "/home/fazal/anaconda3/envs/dev3/lib/python3.6/site-packages/torch_sparse/init.py", line 23, in raise OSError(e) OSError: libcusparse.so.10: cannot open shared object file: No such file or directory

Environment

  • PyG version:
  • PyTorch version:1.4
  • OS: 22.04 lts
  • Python version: 3.6
  • CUDA/cuDNN version: 10.1
  • How you installed PyTorch and PyG (conda, pip, source):
  • Any other relevant information (e.g., version of torch-scatter): i have tried many different solution but cannot slove this problem. i am working on this code https://github.com/yongxinw/GSDT

faziii0 avatar Aug 17 '22 05:08 faziii0

Can you share some more information about how you tried to install PyG? I am seeing that you are using PyTorch 1.4.0 on CUDA 10.1, so it might be best to directly install from wheels using this link: https://data.pyg.org/whl/torch-1.4.0%2Bcu101.html. Note that you may need to specify older versions for torch-sparse, torch-scatter, etc.

rusty1s avatar Aug 17 '22 10:08 rusty1s

CUDA=$1 pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.4.0+${CUDA}z.html pip install --no-index torch-sparse -f https://pytorch-geometric.com/whl/torch-1.4.0+${CUDA}.html pip install --no-index torch-cluster -f https://pytorch-geometric.com/whl/torch-1.4.0+${CUDA}.html pip install --no-index torch-spline-conv -f https://pytorch-geometric.com/whl/torch-1.4.0+${CUDA}.html pip install torch-geometric

i use these commands

faziii0 avatar Aug 18 '22 00:08 faziii0

Try

pip install --no-index torch-scatter==2.0.4 torch-sparse==0.5.1 torch-cluster==1.5.2 torch-spline-conv==1.2.0 -f https://pytorch-geometric.com/whl/torch-1.4.0+cu101.html

rusty1s avatar Aug 18 '22 14:08 rusty1s

I have tried but got the same error

Traceback (most recent call last): File "/home/fazal/anaconda3/envs/dev/lib/python3.6/site-packages/torch_sparse/init.py", line 13, in '_version', [osp.dirname(file)]).origin) File "/home/fazal/anaconda3/envs/dev/lib/python3.6/site-packages/torch/_ops.py", line 106, in load_library ctypes.CDLL(path) File "/home/fazal/anaconda3/envs/dev/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: libcusparse.so.10: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "track_gnn.py", line 20, in from tracker.multitracker import GNNTracker File "/home/fazal/Downloads/MOT/GSDT-main/src/lib/tracker/multitracker.py", line 8, in from models.model import create_model, load_model File "/home/fazal/Downloads/MOT/GSDT-main/src/lib/models/model.py", line 9, in from .networks.pose_dla_dcn import get_pose_net_with_gnn as get_dla_dcn_gnn File "/home/fazal/Downloads/MOT/GSDT-main/src/lib/models/networks/pose_dla_dcn.py", line 14, in from torch_geometric.nn import GATConv, GraphConv, GCNConv, AGNNConv, EdgeConv File "/home/fazal/anaconda3/envs/dev/lib/python3.6/site-packages/torch_geometric/init.py", line 4, in import torch_geometric.data File "/home/fazal/anaconda3/envs/dev/lib/python3.6/site-packages/torch_geometric/data/init.py", line 1, in from .data import Data File "/home/fazal/anaconda3/envs/dev/lib/python3.6/site-packages/torch_geometric/data/data.py", line 3, in from torch_geometric.typing import OptTensor, NodeType, EdgeType File "/home/fazal/anaconda3/envs/dev/lib/python3.6/site-packages/torch_geometric/typing.py", line 4, in from torch_sparse import SparseTensor File "/home/fazal/anaconda3/envs/dev/lib/python3.6/site-packages/torch_sparse/init.py", line 22, in raise OSError(e) OSError: libcusparse.so.10: cannot open shared object file: No such file or directory

faziii0 avatar Aug 22 '22 00:08 faziii0

I am sorry to hear. Are you sure that nvcc --version refers to CUDA 10? Does libcusparse.so.10 exist in /usr/local/cuda/lib?

rusty1s avatar Aug 23 '22 09:08 rusty1s

libcusparse.so.10.3.0.243 libcusparse.so.10

yes found those two

faziii0 avatar Aug 24 '22 05:08 faziii0

Super, can you add the root directory of these two files to the LD_LIBRARY_PATH environment variable?

rusty1s avatar Aug 24 '22 06:08 rusty1s

in the virtual env or from home dir. Can you guide me little bit how can i do it. thanks

faziii0 avatar Aug 25 '22 03:08 faziii0

This would something like this

export LD_LIBRARY_PATH=/usr/local/cuda/lib:$LD_LIBRARY_PATH

Note that you may adjust the path dependent on your CUDA installation. After that, libcusparse.so.10 should be picked up correctly.

rusty1s avatar Aug 25 '22 06:08 rusty1s