title: How can I use TensorFlow without CUDA on Linux?
body: <p>I have two computers without CUDA: one runs on Microsoft Windows, the other one runs on Linux (Ubuntu 14.04 64bit / Linux 3.13.0-100-generic))</p>
  
  <p>I can use TensorFlow without CUDA on Microsoft Windows without any issue: TensorFlow uses the CPU. However, if on the Linux machine I run  in python  <code>import tensorflow as tf</code>, then TensorFlow fails to get imported due to CUDA being not installed:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 24, in &lt;module&gt;
      from tensorflow.python import *
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 72, in &lt;module&gt;
      raise ImportError(msg)
  ImportError: Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 61, in &lt;module&gt;
      from tensorflow.python import pywrap_tensorflow
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in &lt;module&gt;
      _pywrap_tensorflow = swig_import_helper()
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
      _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
  ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory
  
  
  Failed to load the native TensorFlow runtime.
  
  See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#import_error
  
  for some common reasons and solutions.  Include the entire stack trace
  above this error message when asking for help.
  </code></pre>
  
  <p>How can I use TensorFlow without CUDA on Linux?</p>
  
  <p>I use <code>tensorflow-gpu==1.0.0</code>.</p>
  
  <hr>
  
  <p>I'm aware of the parameter <code>device_count</code> in  <code>tensorflow.ConfigProto</code>, which allows to disable the GPU, e.g.:</p>
  
  <pre><code>import tensorflow as tf
  
  a = tf.constant(1, name = 'a')
  b = tf.constant(3, name = 'b')
  c = tf.constant(9, name = 'c')
  d = tf.add(a, b, name='d')
  e = tf.add(d, c, name='e')
  
  config = tf.ConfigProto(device_count={'CPU': 1, 'GPU': 0})
  sess = tf.Session(config=config)
  print(sess.run([d, e]))
  </code></pre>
  
  <p>but it doesn't help since  <code>import tensorflow as tf</code> is the issue.</p>
  
  <p>I also know how to install CUDA 8:</p>
  
  <pre><code># Install Nvidia drivers, CUDA and CUDA toolkit, following some instructions from http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
  wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64-deb
  sudo dpkg -i cuda-repo-ubuntu1404-8-0-local-ga2_8.0.61-1_amd64-deb
  sudo apt-get update
  sudo apt-get install cuda
  </code></pre>
  
  <p>but would prefer to avoid it on these two machines.</p>