【发布时间】:2016-11-30 13:46:43
【问题描述】:
我按照 tensorflow 网页上的说明安装了 tensorflow,使用以下命令:
sudo apt-get install python-pip python-dev
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc0-cp27-none-linux_x86_64.whl
sudo pip install --upgrade $TF_BINARY_URL
然后我运行 python 并输入:
import tensorflow
我收到以下错误消息:
ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
Error importing tensorflow. Unless you are using bazel,
you should not try to import tensorflow from its source directory;
please exit the tensorflow source tree, and relaunch your python interpreter
from there.
我在谷歌上搜索过这个问题并找到了类似https://github.com/tensorflow/tensorflow/issues/1244 的答案 和 https://github.com/NVIDIA/DIGITS/issues/8 但它们都对我的问题没有帮助。 我的 python 版本是 2.7.6。我正在为 Linux 安装仅限 CPU 的版本。 当我第一次以上述方式安装 tensorflow 时,它工作正常,并且我设法运行了一些教程示例。但是今天我尝试安装 anaconda,这是另一个有用的计算工具箱。安装的时候发现没有tensorflow了。所以我再次使用 conda 安装了 tensorflow。但是随后发生了上述错误。现在我已经移除了anaconda,并且移除了anaconda添加的环境路径。但是导入错误仍未解决。 我对发生的事情感到困惑。谢谢大家的热心帮助!!!!
【问题讨论】:
标签: python tensorflow anaconda