question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please help me with OSError: libcusparse.so.10: cannot open shared object file: No such file or directory

See original GitHub issue

❓ Questions & Help

this is the traceback

`Traceback (most recent call last): File “/home/yrwang/.local/lib/python3.6/site-packages/torch_sparse/init.py”, line 15, in <module> library, [osp.dirname(file)]).origin) File “/home/yrwang/.local/lib/python3.6/site-packages/torch/_ops.py”, line 106, in load_library ctypes.CDLL(path) File “/usr/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 “<stdin>”, line 1, in <module> File “/home/yrwang/.local/lib/python3.6/site-packages/torch_geometric/init.py”, line 2, in <module> import torch_geometric.nn File “/home/yrwang/.local/lib/python3.6/site-packages/torch_geometric/nn/init.py”, line 2, in <module> from .data_parallel import DataParallel File “/home/yrwang/.local/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py”, line 5, in <module> from torch_geometric.data import Batch File “/home/yrwang/.local/lib/python3.6/site-packages/torch_geometric/data/init.py”, line 1, in <module> from .data import Data File “/home/yrwang/.local/lib/python3.6/site-packages/torch_geometric/data/data.py”, line 7, in <module> from torch_sparse import coalesce File “/home/yrwang/.local/lib/python3.6/site-packages/torch_sparse/init.py”, line 23, in <module> raise OSError(e) OSError: libcusparse.so.10: cannot open shared object file: No such file or directory `

my cuda,cudnn is well installed : nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Sun_Jul_28_19:07:16_PDT_2019 Cuda compilation tools, release 10.1, V10.1.243 my torch version: >>> print(torch.__version__) 1.4.0 I use

`pip3 install torch-scatter==2.0.4+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html

pip3 install torch-sparse==0.6.1+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html

pip3 install torch-cluster==1.5.4+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html

pip3 install torch-spline-conv==1.2.0+cu101 -f https://pytorch-geometric.com/whl/torch-1.4.0.html

pip3 install torch-geometric` to install torch-geometric, but the problem occur, thanks for helping me

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:39 (11 by maintainers)

github_iconTop GitHub Comments

15reactions
phamquiluancommented, Jun 16, 2020

Ubuntu 18.04 This is my procedure to fix this bug.

  1. cd to /usr/local/cuda
  2. run find -name libcus*

image

if you see “libcusparse.so.11”, continue following steps:

remove current cuda

  1. sudo apt-get --purge remove "*cublas*" "cuda*" "nsight*"
  2. sudo apt-get --purge remove "*nvidia*"

install new cuda-10-2 5. wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin 6. sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 7. wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb 8. sudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.deb 9. sudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pub 10. sudo apt-get update 11. sudo apt-get -y install cuda-10-2

image

add CUDA to PATH

$ export PATH=/usr/local/cuda/bin:$PATH
$ echo $PATH
>>> /usr/local/cuda/bin:...
$ export CPATH=/usr/local/cuda/include:$CPATH
$ echo $CPATH
>>> /usr/local/cuda/include:...
$ export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
$ echo $LD_LIBRARY_PATH
>>> /usr/local/cuda/lib64:...
$ export DYLD_LIBRARY_PATH=/usr/local/cuda/lib:$DYLD_LIBRARY_PATH
$ echo $DYLD_LIBRARY_PATH
>>> /usr/local/cuda/lib:...

image

2reactions
filipekstrmcommented, Feb 16, 2021

I had this problem when using conda. In my conda environment I had installed pytorch and torchvision with pip, but pip uninstall pytorch and torchvision and then install them through conda instead solved the issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Please help me with OSError: libcusparse.so.10: cannot open ...
Please help me with OSError: libcusparse.so.10: cannot open shared object file: No such file or directory #1125.
Read more >
libcusparse.so.10.0: cannot open shared object file: No such ...
so. 10.0: cannot open shared object file: No such file or directory - Stack Overflow. Stack Overflow for Teams – Start collaborating and...
Read more >
有效解决OSError: libcusparse.so.11: cannot open shared ...
有效解决OSError: libcusparse.so.11: cannot open shared object file: No such file or directory ... 华为云开发者联盟 该内容已被华为云开发者联盟社区 ...
Read more >
成功解决OSError: libcusparse.so.11: cannot open shared ...
Cannot open shared object file : No such file or directory 问题解决. echo "/usr/local/lib" >> /etc/ld.so.conf(把新共享库目录, ...
Read more >
PyTorch for Jetson - #1076 by Zelda - NVIDIA Developer Forums
_name, mode) OSError: libmpi_cxx.so.20: cannot open shared object file: No such file or directory. I have checked that I have installed ...
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