【问题标题】:TensorFlow GPU linux installationTensorFlow GPU Linux 安装
【发布时间】:2017-05-18 13:59:41
【问题描述】:

这是我得到的错误:

import tensorflow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
 File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
 File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudart.so.7.5: cannot open shared object file: No such file or directory

谁能告诉我如何在ubuntu 16.04平台上一步一步安装?

【问题讨论】:

标签: python machine-learning tensorflow


【解决方案1】:

您丢失了环境变量。请参阅github issue。更多信息请参考post

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
export CUDA_HOME=/usr/local/cuda

【讨论】:

    【解决方案2】:

    如果您使用的是 anaconda,请在您的 anaconda 提示符下运行此命令

    conda install -c anaconda tensorflow-gpu

    这还将为您安装cuda toolkitcudnn,一切顺利

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-14
      • 1970-01-01
      • 1970-01-01
      • 2020-12-20
      • 2018-07-12
      • 2021-06-05
      相关资源
      最近更新 更多