ImportError: libcudnn when running a TensorFlow program

前端 未结 8 1991
名媛妹妹
名媛妹妹 2020-12-03 07:03

I encountered the following error when trying to run a TensorFlow program:

ImportError: libcudnn.Version: cannot open shared object file: No such file or d         


        
8条回答
  •  佛祖请我去吃肉
    2020-12-03 07:25

    Make sure the $LD_LIBRARY_PATH environment variable is set to the correct path.

    From the cuDNN Install Guide:

    ALL PLATFORMS

    Extract the cuDNN archive to a directory of your choice, referred to below as .
    Then follow the platform-specific instructions as follows.
    

    LINUX

    cd 
    export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
    
    Add  to your build and link process by adding -I to your compile
    line and -L -lcudnn to your link line.
    

    OS X

    cd 
    export DYLD_LIBRARY_PATH=`pwd`:$DYLD_LIBRARY_PATH
    
    Add  to your build and link process by adding -I to your compile
    line and -L -lcudnn to your link line.
    

    WINDOWS

    Add  to the PATH environment variable.
    
    In your Visual Studio project properties, add  to the Include Directories 
    and Library Directories lists and add cudnn.lib to Linker->Input->Additional Dependencies.
    

提交回复
热议问题