Pycuda libcurand Import Error

I had to downgrade my CUDA installation from 9.2 to 9.0 and I am now getting the following error at “import pycuda.driver”:

ImportError: libcurand.so.9.2: cannot open shared object file: No such file or directory

And at “import tensorrt” I get

ImportError: Please make sure you have pycuda installed

I do have libcurand.so.9.0. What can I do to get pycuda working with CUDA 9.0?

I tried to uninstall pycuda and install it again as per TensorRT installation page, but that did not work. Pycuda was installed via “pip install ‘pycuda>=2017.1.1’”

OS: Ubuntu 16.04

your pycuda import is looking for CUDA 9.2, not 9.0

Yes, I can see that. But pycuda is compatible with CUDA 9.0, isn’t it? My question is, how can I make pycuda look for CUDA 9.0?

install a version of pycuda that has been compiled for CUDA 9.0

or build it yourself:

  1. make sure you have a proper CUDA 9.0 install
  2. follow the pycuda install/build instructions:

[url]https://wiki.tiker.net/PyCuda/Installation/Linux[/url]

  1. In step 3, where it says:

$ python configure.py --cuda-root=/where/ever/you/installed/cuda

make sure you modify /where/ever/you/installed/cuda to point to your CUDA 9.0 install

Thank you! Installing the same version from source worked perfectly.

I have installed pycuda with conda install -c lukepfister pycuda command in a conda environment , in ubuntu…
I have cuda 10.0 in my system, and when i try to import pycuda.autoinit, i am getting the error like this,

Traceback (most recent call last):
File “”, line 1, in
File “/home/anaconda3/envs/measure_dl/lib/python3.6/site-packages/pycuda-2017.1-py3.6-linux-x86_64.egg/pycuda/autoinit.py”, line 2, in
import pycuda.driver as cuda
File “/home/anaconda3/envs/measure_dl/lib/python3.6/site-packages/pycuda-2017.1-py3.6-linux-x86_64.egg/pycuda/driver.py”, line 5, in
from pycuda._driver import * # noqa
ImportError: libcurand.so.8.0: cannot open shared object file: No such file or directory

The particular pycuda you selected was built against CUDA 8.0.

You can’t use CUDA 10.0 as a substitute for that.

I’m not familiar with -c lukepfister and won’t be able to help any further with this. There are many many resources already on the web explaining how to install pycuda.

Thank you. Solved by installing pycuda-2020.1