title: With multiple versions of CUDA installed, how can I make Tensorflow-GPU use a specific version of CUDA on Windows
body: <p>I currently have two versions of CUDA installed on my computer: 9.0 and 10.0. I have some Python modules that require CUDA 9.0 and some that require 10.0. For example, the version of Tensorflow-GPU I use requires CUDA 10.0. When I try to start training, I get the following error message:</p>
  
  <pre><code>2019-05-23 10:59:35.911847: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
  2019-05-23 10:59:39.907756: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1433] Found device 0 with properties:
  name: Tesla V100-PCIE-16GB major: 7 minor: 0 memoryClockRate(GHz): 1.38
  pciBusID: 0000:84:00.0
  totalMemory: 15.90GiB freeMemory: 14.98GiB
  2019-05-23 10:59:39.919434: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1512] Adding visible gpu devices: 0
  Traceback (most recent call last):
    File "wider_faces_inference.py", line 137, in &lt;module&gt;
      output_dict_array = run_inference_for_images(image_np_list, detection_graph)
    File "wider_faces_inference.py", line 74, in run_inference_for_images
      with tf.Session() as sess:
    File "C:\ProgramData\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\client\session.py", line 1551, in __init__
      super(Session, self).__init__(target, graph, config=config)
    File "C:\ProgramData\Anaconda3\envs\tensorflow-gpu\lib\site-packages\tensorflow\python\client\session.py", line 676, in __init__
      self._session = tf_session.TF_NewSessionRef(self._graph._c_graph, opts)
  tensorflow.python.framework.errors_impl.InternalError: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version
  </code></pre>
  
  <p>This I believe is because tensorflow is not looking for the right version of CUDA. I wonder how I can make tensorflow use the correct version of CUDA. </p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>To add a bit more information:</p>
  
  <p>The version of Tensorflow I installed was compiled against CUDA 10.0. I installed CUDA 10.0 and Tensorflow-GPU first, and tensorflow worked just fine. Then I installed CUDA 9.0, and after installation, tensorflow stopped working. </p>