I was able to use Ubuntu 16.04 + GTX1080 + Tensorflow v0.10, but suddenly I got the following error.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/val/.pyenv/versions/anaconda3-4.1.1/envs/tensorflow/lib/python3.5/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
File "/home/val/.pyenv/versions/anaconda3-4.1.1/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 48, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/val/.pyenv/versions/anaconda3-4.1.1/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
File "/home/val/.pyenv/versions/anaconda3-4.1.1/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
File "/home/val/.pyenv/versions/anaconda3-4.1.1/envs/tensorflow/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/val/.pyenv/versions/anaconda3-4.1.1/envs/tensorflow/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
It was working with CUDA 8.0 installed (that is, CUDA 7.5 was not installed), but it was a mystery why I suddenly wanted 7.5 libcudart. ..
I was in trouble and tried various things, but no. I thought it was necessary to reinstall Tensorflow, and when I looked at Anaconda install on the official page (https://www.tensorflow.org/versions/r0.10/get_started/os_setup.html), it was certainly v0.10. Comments require CUDA 7.5.
# Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 7.5 and CuDNN v5. For other versions, see "Install from sources" below.
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl
So, since r0.11 was released, when I looked at it, the comment changed and it says that CUDA toolkit 8.0 is required. After seeing this, I took the plunge and updated to v.0.11.
Ubuntu/Linux 64-bit, GPU enabled, Python 3.5
# Requires CUDA toolkit 8.0 and CuDNN v5. For other versions, see "Install from sources" below.
(tensorflow)$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.11.0-cp35-cp35m-linux_x86_64.whl
# Python 3
(tensorflow)$ pip3 install --ignore-installed --upgrade $TF_BINARY_URL
When I run it with source activate, it succeeds!
>>> import tensorflow as tf
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally
So, for those who have CUDA 8.0 installed, it seems better to use r0.11 or higher.
Recommended Posts