'Library not loaded: @rpath/libcudart.7.5.dylib' TensorFlow Error on Mac

后端 未结 4 1485
孤城傲影
孤城傲影 2020-11-29 08:19

I\'m using OS X El Capitan (10.11.4).

I just downloaded TensorFlow using the pip install instructions here.

Everything went pretty smoothly, though I did get

4条回答
  •  感情败类
    2020-11-29 09:05

    To add to @mrry's answer, if you already have CUDA installed but you still get the error, it could be because the CUDA libraries are not on your path. Add the following to your ~/.bashrc or ~/.zshrc:

    # export CUDA_HOME=/Developer/NVIDIA/CUDA-7.5 ## This is the default location on macOS
    export CUDA_HOME=/usr/local/cuda
    export DYLD_LIBRARY_PATH="$CUDA_HOME/lib:$DYLD_LIBRARY_PATH"
    export PATH="$CUDA_HOME/bin:$PATH"
    

    Uncomment either of the CUDA_HOMEs or edit it so that it contains your CUDA install. If you do not know where it is installed, try:

    find / -name "*libcudart*"
    

提交回复
热议问题