Infrorror:libcublas.so.10.0:无法打开共享对象文件:没有此类文件或目录



我已经在Ubuntu 18.04上安装了Cuda 10.1和Cudnn,并且似乎正确安装了NVCC和NVIDIA-SMI,我得到了正确的响应:

user:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105
user:~$ nvidia-smi 
Mon Mar 18 14:36:47 2019       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.43       Driver Version: 418.43       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro K5200        Off  | 00000000:03:00.0  On |                  Off |
| 26%   39C    P8    14W / 150W |    225MiB /  8118MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1538      G   /usr/lib/xorg/Xorg                            32MiB |
|    0      1583      G   /usr/bin/gnome-shell                           5MiB |
|    0      3008      G   /usr/lib/xorg/Xorg                           100MiB |
|    0      3120      G   /usr/bin/gnome-shell                          82MiB |
+-----------------------------------------------------------------------------+

我使用以下方式安装了TensorFlow: user:~$ sudo pip3 install --upgrade tensorflow-gpu

The directory '/home/amin/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/amin/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: tensorflow-gpu in /usr/local/lib/python3.6/dist-packages (1.13.1)
Requirement already satisfied, skipping upgrade: keras-applications>=1.0.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.0.7)
Requirement already satisfied, skipping upgrade: protobuf>=3.6.1 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (3.6.1)
Requirement already satisfied, skipping upgrade: wheel>=0.26 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (0.32.3)
Requirement already satisfied, skipping upgrade: absl-py>=0.1.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (0.7.0)
Requirement already satisfied, skipping upgrade: keras-preprocessing>=1.0.5 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.0.9)
Requirement already satisfied, skipping upgrade: gast>=0.2.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (0.2.2)
Requirement already satisfied, skipping upgrade: termcolor>=1.1.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.1.0)
Requirement already satisfied, skipping upgrade: grpcio>=1.8.6 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.18.0)
Requirement already satisfied, skipping upgrade: tensorflow-estimator<1.14.0rc0,>=1.13.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.13.0)
Requirement already satisfied, skipping upgrade: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow-gpu) (1.11.0)
Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in /usr/lib/python3/dist-packages (from tensorflow-gpu) (1.13.3)
Requirement already satisfied, skipping upgrade: astor>=0.6.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (0.7.1)
Requirement already satisfied, skipping upgrade: tensorboard<1.14.0,>=1.13.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-gpu) (1.13.1)
Requirement already satisfied, skipping upgrade: h5py in /usr/local/lib/python3.6/dist-packages (from keras-applications>=1.0.6->tensorflow-gpu) (2.9.0)
Requirement already satisfied, skipping upgrade: setuptools in /usr/local/lib/python3.6/dist-packages (from protobuf>=3.6.1->tensorflow-gpu) (40.6.3)
Requirement already satisfied, skipping upgrade: mock>=2.0.0 in /usr/local/lib/python3.6/dist-packages (from tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow-gpu) (2.0.0)
Requirement already satisfied, skipping upgrade: werkzeug>=0.11.15 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow-gpu) (0.14.1)
Requirement already satisfied, skipping upgrade: markdown>=2.6.8 in /usr/local/lib/python3.6/dist-packages (from tensorboard<1.14.0,>=1.13.0->tensorflow-gpu) (3.0.1)
Requirement already satisfied, skipping upgrade: pbr>=0.11 in /usr/local/lib/python3.6/dist-packages (from mock>=2.0.0->tensorflow-estimator<1.14.0rc0,>=1.13.0->tensorflow-gpu) (5.1.1)

但是,当我尝试导入TensorFlow时,我会遇到有关libcublas.so.10.0的错误:

user:~$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory

Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

我缺少什么?我该如何解决?

谢谢

我从以下链接下载了cuda 10.0CUDA 10.0

然后我使用以下命令安装了它:

sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda-10-0
然后,我通过链接安装了CUDA 10.0的Cudnn v7.5.0cudnn下载,您需要使用帐户登录。

选择了我通过链接cudnn电源链接下载的正确版本后之后,我添加了cudnn的include和lib文件如下:

sudo cp -P cuda/targets/ppc64le-linux/include/cudnn.h /usr/local/cuda-10.0/include/
sudo cp -P cuda/targets/ppc64le-linux/lib/libcudnn* /usr/local/cuda-10.0/lib64/
sudo chmod a+r /usr/local/cuda-10.0/lib64/libcudnn*

修改了lib的.bashrc和cuda 10.0的路径,如果没有它,则需要将它们添加到.bashrc

export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

在所有这些步骤之后,我成功地在Python3中导入了TensorFlow。。

从此答案中复制:https://github.com/tensorflow/tensorflow/issues/26182#issuecomment-684993950

... libcublas.so.10坐落在/usr/local/cuda-10.2/lib64(来自Nvidia的惊喜 - 安装10.1安装10.2件东西),但只有/usr/local/cuda在路径中包括哪个点to/usr/local/cuda-10.1。

fix 是将其添加到您的包含路径:

export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

注意:该修复程序已知可以在CUDA 10.1,v10.1.243(用nvcc -V打印您的版本)。

cuda 10.1每个TensorFlow文档)抛出can't find libcublas.so.10.0错误。lib存在于/usr/local/cuda-10.1/targets/x86_64-linux/lib/中,但被错误命名。

还有另一个(丢失的)Stackoverflow帖子说这是包裹的依赖性问题,可以用额外的CLI标志来固定。这似乎并没有解决我的问题。

测试的解决方法是修改说明以降级为CUDA 10.0

# Uninstall packages from tensorflow installation instructions 
sudo apt-get remove cuda-10-1 
    libcudnn7 
    libcudnn7-dev 
    libnvinfer6 
    libnvinfer-dev 
    libnvinfer-plugin6
# WORKS: Downgrade to CUDA-10.0
sudo apt-get install -y --no-install-recommends 
    cuda-10-0 
    libcudnn7=7.6.4.38-1+cuda10.0  
    libcudnn7-dev=7.6.4.38-1+cuda10.0;
sudo apt-get install -y --no-install-recommends 
    libnvinfer6=6.0.1-1+cuda10.0 
    libnvinfer-dev=6.0.1-1+cuda10.0 
    libnvinfer-plugin6=6.0.1-1+cuda10.0;

升级到cuda-10.2似乎也遭受了相同的问题

# BROKEN: Upgrade to CUDA-10.2 
# use `apt show -a libcudnn7 libnvinfer7` to find 10.2 compatable version numbers
sudo apt-get install -y --no-install-recommends 
    cuda-10-2 
    libcudnn7=7.6.5.32-1+cuda10.2  
    libcudnn7-dev=7.6.5.32-1+cuda10.2;
sudo apt-get install -y --no-install-recommends 
    libnvinfer7=7.0.0-1+cuda10.2 
    libnvinfer-dev=7.0.0-1+cuda10.2 
    libnvinfer-plugin7=7.0.0-1+cuda10.2;

测试Python中的GPU可见性

python3
>>> import tensorflow as tf
>>> tf.test.is_gpu_available()

TensorFlow Import in tensorflow上的未来胜地

https://github.com/tensorflow/tensorflow/issues/30427

两个解决方案:

  • pip3 install tf-nightly-gpu
  • pip3 install "numpy<1.17"

更新:

您还需要正确的TensorFlow版本才能与CUDA版本匹配

TensorFlow/CUDA版本组合:

  • TensorFlow v2.x不支持CUDA 9(Ubuntu 18.4默认值)
  • TensorFlow v2.1.0与CUDA 10.1
  • 一起使用
  • TensorFlow V2.0.0与CUDA 10.0
  • 一起使用

请参阅完整列表:https://www.tensorflow.org/install/source#tested_build_configurations

您可能需要用匹配您的CUDA

的命名版本来重新安装TensorFlow
pip uninstall tensorflow tensorflow-gpu
pip install tensorflow==2.1.0 tensorflow-gpu==2.1.0

然后将cuda添加到$路径和$ ld_library_path in〜/.bashrc

〜/.bashrc

# CUDA Environment Setup: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#environment-setup
for CUDA_BIN_DIR in `find /usr/local/cuda-*/bin   -maxdepth 0`; do export PATH="$PATH:$CUDA_BIN_DIR"; done;
for CUDA_LIB_DIR in `find /usr/local/cuda-*/lib64 -maxdepth 0`; do export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}$CUDA_LIB_DIR"; done;
export            PATH=`echo $PATH            | tr ':' 'n' | awk '!x[$0]++' | tr 'n' ':' | sed 's/:$//g'` # Deduplicate $PATH
export LD_LIBRARY_PATH=`echo $LD_LIBRARY_PATH | tr ':' 'n' | awk '!x[$0]++' | tr 'n' ':' | sed 's/:$//g'` # Deduplicate $LD_LIBRARY_PATH

我在我的conda环境上安装了正确的CUDA和tensorflow-gpu==1.14.0版本,但是我仍然以某种方式收到此错误消息。这篇文章帮助我最终解决了它。

我以前已经通过pip安装了tensorflow-gpu-创建新环境并通过conda安装CC_11解决了我的问题。

conda install -c anaconda tensorflow-gpu=1.14.0

当安装CUDA和TensorFlow的版本不兼容时,就会发生此错误。使用CUDA 9运行TensorFlow版本1.13.0时,我遇到了类似的Improterror。由于我在使用PIP的虚拟环境上安装了TensorFlow,因此我只是卸载了TensorFlow 1.13.0并安装了TensorFlow 1.12.0,如下所示;

    pip uninstall tensorflow-gpu tensorflow-estimator tensorboard
    pip install tensorflow-gpu==1.12.0

现在一切都起作用。

正如Calderbot提到的那样,您也可以做到这一点

sudo cp -r/usr/local/cuda-10.2/lib64/libcu*/usr/local/cuda-10.1/lib64/

我也有相同的问题。我通过将以下命令添加到' .bashrc '文件。

来修复它。

export ld_library_path = $ ld_library_path:/usr/local/cuda-10.0.0/lib64/

系统配置:

Ubuntu 16.04 LTS
Tensorflow GPU 2.0beta1
Cuda 10.0
cuDNN 7.6.0 for Cuda 10.0

我使用conda配置我的系统。

问题是由您当前的CUDA版本(10.1)引起的(正如我们可以从顶部看到图像的右角)。

您可以从官方TF网站上看到,TF和CUDA之间的信件是:图表的TF网站

Version                 cuDNN    CUDA
tensorflow-2.1.0         7.6       10.1
tensorflow-2.0.0         7.4       10.0
tensorflow_gpu-1.14.0    7.4       10.0
tensorflow_gpu-1.13.1    7.4       10.0

因此,您可以将TF升级到2.1,也可以使用:

降级CUDA
conda install cudatoolkit=10.0.130

然后它也会自动降级您的cudnn。

如果某人仍在遇到这个问题,则可以存在libcublas.so.10,但名称为libcublas.so.10.0

因此,您可以通过运行:

来修复它
sudo ln libcublas.so.10.0.130 libcublas.so.10

/usr/local/cuda-10.0/lib64

更改我的tensorflow版本解决了我的问题。

检查此问题1Https://github.com/tensorflow/tensorflow/issues/26182)

官方Tensorflow-GPU二进制文件(由PIP或CONDA下载的二进制文件)是使用CUDA 9.0,自tf 1.5以来的Cudnn 7和Cuda 10.0,Cuda 10.0,Cudnn 7构建的,自TF 1.13以来。这些写在发行说明中。如果使用官方二进制文件,则必须使用CUDA的匹配版本。

您的计算机CUDA是否有能力?

在Linux中,您可以验证系统是否具有CUDA能力的GPU:

$ lspci | grep -i nvidia

如果您看不到任何设置,请通过在命令行中输入update-pciids(通常在/sbin中)来更新Linux维护的PCI硬件数据库,然后重新运行以前的LSPCI命令。

在此页面中,您有指令安装CUDA:https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

如果您的计算机没有CUDA能力,则可以安装另一个TensorFlow或编译TensorFlow代码的分布:https://www.tensorflow.org/install/source/source

<<div><">

我在这里尝试了所有解决方案,没有任何解决方案。这是我解决的方式。

  1. 首先去这里看看是否缺少文件
/usr/local/cuda/lib64

确实缺少。我必须提供它。

  1. 查看是否可用libcublas
❯ sudo apt-cache search libcublas                                                                                                                         ─╯
libcublas11 - NVIDIA cuBLAS Library
libcublaslt11 - NVIDIA cuBLASLt Library
libcublas-dev-11-6 - CUBLAS native dev links, headers
libcublas-11-6 - CUBLAS native runtime libraries
libcublas-12-1 - CUBLAS native runtime libraries
libcublas-dev-12-1 - CUBLAS native dev links, headers
  1. 安装错误中提到的特定版本
❯ sudo apt install libcublas11

它工作。

cuda-10.2安装似乎已将libcublas.so.10移至一个目录更深。在我的cuda-9.1的非根安装中,上述库位于我在安装过程中指定的--toolkitpathlib64文件夹中。现在它在lib64/lib64/文件夹中。因此,我要做的就是向LD_LIBRARY_PATH添加更多路径。

  1. 我是通过从下面的网站上理解的。它说CUDA工具套件安装不正确。https://saturncloud.io/blog/how-to-fix-the-tensorflow-importerror-libcublasso80-error/
  2. 然后我重新安装CUDA工具包:https://developer.nvidia.com/cuda-downloads?target_os=linux& target_ark = x86_64&amp; distribution = ubuntu&amp; target_version = 22.04&amp;
  3. 然后我去网站:解决安装问题:https://forums.developer.nvidia.com/t/driver-in--inknown-state-after-awter-awter-to-install-cuda-ubuntu-22-04/217106/2

amin,

尝试从TensorFlow模型包运行Imagenet教程时,我会遇到相同的错误 - https://github.com/tensorflow/models/tree/master/master/master/tutorials/image/image/image/imagenet

 python3 classify_image.py
 ...
 2019-07-21 22:29:58.367858: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
 2019-07-21 22:29:58.367982: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcublas.so.10.0'; dlerror: libcublas.so.10.0: cannot open shared object file: No such file or directory
 2019-07-21 22:29:58.368112: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcufft.so.10.0'; dlerror: libcufft.so.10.0: cannot open shared object file: No such file or directory
 2019-07-21 22:29:58.368234: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcurand.so.10.0'; dlerror: libcurand.so.10.0: cannot open shared object file: No such file or directory
 2019-07-21 22:29:58.368369: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusolver.so.10.0'; dlerror: libcusolver.so.10.0: cannot open shared object file: No such file or directory
 2019-07-21 22:29:58.368498: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Could not dlopen library 'libcusparse.so.10.0'; dlerror: libcusparse.so.10.0: cannot open shared object file: No such file or directory
 2019-07-21 22:29:58.374333: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7

我认为某个地方的版本不兼容,可能的张力可能仍然依赖于CUDA库提供的旧版本的二进制文件。去存储二进制文件并创建命名为10.0但Targets 10.1或库的默认版本的链接似乎为我解决了问题。

 # cd /usr/lib/x86_64-linux-gnu
 # ln -s libcudart.so.10.1 libcudart.so.10.0
 # ln -s libcublas.so libcublas.so.10.0
 # ln -s libcufft.so libcufft.so.10.0
 # ln -s libcurand.so libcurand.so.10.0
 # ln -s libcusolver.so libcusolver.so.10.0
 # ln -s libcusparse.so libcusparse.so.10.0

现在我能够成功运行教程

 2019-07-24 21:43:21.172908: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
 2019-07-24 21:43:21.174653: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
 2019-07-24 21:43:21.175826: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
 2019-07-24 21:43:21.182305: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
 2019-07-24 21:43:21.183970: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
 2019-07-24 21:43:21.206796: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
 2019-07-24 21:43:21.210685: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
 2019-07-24 21:43:21.212694: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
 2019-07-24 21:43:21.213060: I tensorflow/core/platform/cpu_feature_guard.cc:142]      
 Your CPU supports instructions that this TensorFlow binary was not compiled to use: FMA
 2019-07-24 21:43:21.238541: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 3214745000 Hz
 2019-07-24 21:43:21.240096: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x557e2b682ce0 executing computations on platform Host. Devices:
 2019-07-24 21:43:21.240162: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
 2019-07-24 21:43:21.355158: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x557e2b652000 executing computations on platform CUDA. Devices:
 2019-07-24 21:43:21.355234: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): GeForce GTX 1060 6GB, Compute Capability 6.1
 2019-07-24 21:43:21.357074: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties: 
 name: GeForce GTX 1060 6GB major: 6 minor: 1 memoryClockRate(GHz): 1.7715
 pciBusID: 0000:01:00.0
 2019-07-24 21:43:21.357151: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
 2019-07-24 21:43:21.357207: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
 2019-07-24 21:43:21.357245: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
 2019-07-24 21:43:21.357283: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
 2019-07-24 21:43:21.357321: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
 2019-07-24 21:43:21.357358: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
 2019-07-24 21:43:21.357395: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
 2019-07-24 21:43:21.360449: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
 2019-07-24 21:43:21.380616: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
 2019-07-24 21:43:21.385223: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
 2019-07-24 21:43:21.385272: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187]      0 
 2019-07-24 21:43:21.385299: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0:   N 
 2019-07-24 21:43:21.388647: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 5250 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1060 6GB, pci bus id: 0000:01:00.0, compute capability: 6.1)
 2019-07-24 21:43:32.001598: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
 2019-07-24 21:43:32.532105: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
 W0724 21:43:34.981204 140284114071872 deprecation_wrapper.py:119] From classify_image.py:85: The name tf.gfile.GFile is deprecated. Please use tf.io.gfile.GFile instead.

我在尝试安装SPCONV时面临类似的问题。

File "/home/kmario23/anaconda3/envs/py38/lib/python3.8/site-packages/torch/_ops.py", line 105, in load_library
    ctypes.CDLL(path)
  File "/home/kmario23/anaconda3/envs/py38/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libcublas.so.10: cannot open shared object file: No such file or directory

在特定环境中安装CUDA工具包10.1解决了问题:

$ conda install -c anaconda cudatoolkit=10.1

最新更新