やりたいこと
GPUを利用できるTensorflowのインストール
作業環境
- Ubuntu18.04
- Python3.6.7
発生している問題
今、CUDA10.0をインストールし、10.0に対応しているTensorflowであるtf-nightly-gpu-2.0-preview
をpipでインストールするところまでは行うことができました。
bash
1$ nvcc -V 2 3nvcc: NVIDIA (R) Cuda compiler driver 4Copyright (c) 2005-2018 NVIDIA Corporation 5Built on Sat_Aug_25_21:08:01_CDT_2018 6Cuda compilation tools, release 10.0, V10.0.130
しかし、pythonからTensorflowをインポートしようとすると
python
1>>> import tensorflow 2 3Traceback (most recent call last): 4 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module> 5 from tensorflow.python.pywrap_tensorflow_internal import * 6 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module> 7 _pywrap_tensorflow_internal = swig_import_helper() 8 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper 9 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 10 File "/usr/lib/python3.6/imp.py", line 243, in load_module 11 return load_dynamic(name, filename, file) 12 File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic 13 return _load(spec) 14ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory 15 16During handling of the above exception, another exception occurred: 17 18Traceback (most recent call last): 19 File "<stdin>", line 1, in <module> 20 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/__init__.py", line 27, in <module> 21 from tensorflow._api.v2 import audio 22 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/_api/v2/audio/__init__.py", line 8, in <module> 23 from tensorflow.python.ops.gen_audio_ops import decode_wav 24 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module> 25 from tensorflow.python import pywrap_tensorflow 26 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module> 27 raise ImportError(msg) 28ImportError: Traceback (most recent call last): 29 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module> 30 from tensorflow.python.pywrap_tensorflow_internal import * 31 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module> 32 _pywrap_tensorflow_internal = swig_import_helper() 33 File "/home/yudai/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper 34 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 35 File "/usr/lib/python3.6/imp.py", line 243, in load_module 36 return load_dynamic(name, filename, file) 37 File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic 38 return _load(spec) 39ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory 40 41 42Failed to load the native TensorFlow runtime. 43 44See https://www.tensorflow.org/install/errors 45 46for some common reasons and solutions. Include the entire stack trace 47above this error message when asking for help. 48
とエラーが出ます。このエラーはlibcublas.so.10.0
がないと言っているように見えるのですが、このファイルは/usr/local/cuda-10.0/lib64
に存在しており、ここにはpathも通しています。
どうすればTensorflowをインストールできるでしょうか。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。