Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Theano - pyGpuArray can't find libnvrtc.so [duplicate]

In a Google Colab notebook, I am installing a python package which uses pynvrtc to compile some CUDA codes.

I got the error:

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

I run !find / -name 'libnvrtc.*' and get

/usr/lib/x86_64-linux-gnu/libnvrtc.so.8.0.61
/usr/lib/x86_64-linux-gnu/libnvrtc.so.8.0

My question is: Do I suppose to have libnvrtc.so in my Google Colab system? How can I get around if I just have libnvrtc.so.8.0?

like image 364
Po C. Avatar asked Nov 18 '22 16:11

Po C.


1 Answers

Here is what I did to make pynvrtc work. Create symbolic link for libnvrtc.so.

!apt -y install libnvrtc8.0
!ln -snf /usr/lib/x86_64-linux-gnu/libnvrtc.so.8.0 /usr/lib/x86_64-linux-gnu/libnvrtc.so

Motivated by Is it possible to install cupy on google colab?

like image 125
Po C. Avatar answered Dec 05 '22 09:12

Po C.