import tensorflow
语句会触发以下错误:
>>> import tensorflow as tf I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.dylib locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.dylib locally I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.dylib locally "import tensorflow" terminated by signal SIGSEGV (Address boundary error)
答案 0 :(得分:2)
默认情况下,CUDA会创建libcuda.dylib
,但TensorFlow会尝试加载
libcuda.1.dylib
。要解决此问题,请在两者之间创建符号链接
libcuda.dylib
和libcuda.1.dylib
。例如,如果安装了CUDA
在/usr/local/cuda
中,发出以下ln
命令:
ln -sf /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcuda.1.dylib