Skip to content

ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory #1747

Closed

Description

@mortal-Zero

Description

Environment

TensorRT Version: 7.2.1.6
NVIDIA GPU: RTX2080
NVIDIA Driver Version: NVIDIA-Linux-x86_64-470.94.run
CUDA Version: 10.2
CUDNN Version: 8.0.4/8.0.3/7.6.5
Operating System: Ubuntu18.04
Python Version (if applicable): 3.7
PyTorch Version (if applicable): 1.8.1
Baremetal or Container (if so, version):

Relevant Files

Steps To Reproduce

I want to build a tensorrt env, after I run pip install tensorrt-7.2.1.6-cp37-none-linux_x86_64.whl, import tensorrt in python will report the following errorImportError: libcudnn.so.8: cannot open shared object file: No such file or directory
But my cuda env is fine, I can run cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 to get my cudnn version, and libcudnn.so.8 is in /usr/local/cuda-10.2/lib64

Activity

  1. samurdhikaru commented on Apr 7, 2022

    @samurdhikaru
    Contributor

    @Baiyixuan1113 Seems like libcudnn.so.8 is not visible even though it exists. If as you say, it exists in /usr/local/cuda-10.2/lib64, you can do the following in your terminal for a temporary fix:

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.2/lib64/
    

    For a more permanent solution, add the above line to your ~/.bashrc (and source ~/.bashrc if necessary).

  2. added
    triaged
    on Apr 7, 2022
  3. nvpohanh commented on Jul 1, 2022

    @nvpohanh
    Collaborator

    Closing due to >14 days without activity. Please feel free to reopen if the issue still exists. Thanks

  4. knotgrass commented on Dec 12, 2022

    @knotgrass

    you can try solution here

  5. nickchomey commented on Feb 14, 2023

    @nickchomey

    This might help people who stumble across this in the future - I had to install cudnn, in addition to cuda.

    https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html

  6. ashmalvayani commented on Sep 4, 2023

    @ashmalvayani

    solve this by installing:
    pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

    this worked for me. I had to check the cuda version currently installed and download the appropriate PyTorch version from this website:
    https://pytorch.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions