0

我正在使用 anaconda 环境。用于构建洋红色,并按照自述文件执行安装步骤

运行命令后

bazel test //magenta/...

它说

执行了 5 次测试中的 5 次:5 次在本地失败

test.log如下

Traceback (most recent call last):
File "/home/ff/.cache/bazel/_bazel_ff/e20bdd5a13b0197259100b3aae16dd49/execroot/magenta/bazel-out/local-opt/bin/magenta/scripts/convert_midi_dir_to_note_sequences_test.runfiles/__main__/magenta/scripts/convert_midi_dir_to_note_sequences_test.py", line 20, in <module>
import tensorflow as tf
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/ff/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
ImportError: libcudart.so.7.0: cannot open shared object file: No such file or directory

在同一个目录下,如果我尝试在 python cmd 中导入 tensorflow,

import tensorflow
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcudnn.so.4 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:108] successfully opened CUDA library libcurand.so locally

我究竟做错了什么?

4

1 回答 1

0

解决方案(如问题中所述))有所帮助。错误是程序无法找到 cuda 库。所以安装“cuda-ld-conf”库解决了这个问题。

于 2016-07-20T21:17:52.823 回答