Saturday, September 17, 2016

failed to find on this system: Failed precondition: could not dlopen DSO: libcuda.1.dylib

I got that error on my Mac OS X after I tried to do import tensorflow as tf. The solution is a bit hacky, but it's based on the fact that even though the system was unable to find libcuda.1.dylib, if you look in /usr/local/cuda/lib you find that libcuda.dylib does exist. So I simply did:

cd /usr/local/cuda/lib
sudo ln -s libcuda.dylib libcuda.1.dylib

And after that, import tensorflow as tf did not give me an error and I was able to verify that the GPU was in use by following the instructions under "Logging Device Placement" here.

Happy tensorflowing.

No comments:

Post a Comment