gpt4 book ai didi

ubuntu - TensorFlow (GPU) libcudart.so.7.5 错误——无法打开共享对象文件

转载 作者:太空宇宙 更新时间:2023-11-03 16:46:32 28 4
gpt4 key购买 nike

在 Ubuntu 14.04 上使用 GPU 安装 TensorFlow。对 Ubuntu/UNIX 环境相当陌生,所以很多东西我都不懂。在搜索此问题时,我遇到了在安装了 CUDA 7.5 时无法导入 CUDA 7.0 的实例(因为 TensorFlow 不支持 7.5)。我安装了 CUDA 7.0,但它似乎在寻找 7.5 - 这是为什么?我的 .bashrc 文件中有以下几行:

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

但我仍然看到下面的问题...有人有什么建议吗?

>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow import contrib
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/contrib/__init__.py", line 23, in <module>
from tensorflow.contrib import layers
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/contrib/layers/__init__.py", line 68, in <module>
from tensorflow.contrib.layers.python.layers import *
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/__init__.py", line 22, in <module>
from tensorflow.contrib.layers.python.layers.initializers import *
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/contrib/layers/python/layers/initializers.py", line 24, in <module>
from tensorflow.python.ops import random_ops
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/ops/random_ops.py", line 23, in <module>
from tensorflow.python.framework import ops
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 39, in <module>
from tensorflow.python.framework import versions
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/framework/versions.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/ford/tensorflow/local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/ford/tensorflow/local/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.5: cannot open shared object file: No such file or directory

最佳答案

您需要从 SOURCE 安装 tensorflow配置设置。通过 pip 或 easy_install 安装将不起作用。

使用 pip 将 tensorflow 从 0.6.0 升级到 0.7.1 后,我遇到了同样的问题。

关于ubuntu - TensorFlow (GPU) libcudart.so.7.5 错误——无法打开共享对象文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35735162/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com