title: How to downgrade to tensorflow-gpu version 1.12 in google colab
body: <p>I am running a GAN which is compatible only with a older version of tensorflow GPU so I need to downgrade tensorflow gpu from 1.15 in google colab to 1.12. I tried using following commands which has been suggested in this <a href="https://stackoverflow.com/a/54445624/7876086">thread</a>.</p>
  
  <pre><code>%tensorflow_version 1.x
  import tensorflow as tf
  print(tf.__version__)
  
  !nvcc --version
  </code></pre>
  
  <p>After the magic and the version check (which I get tensorflow version == 1.15.2 for now) I install below. After installation of tensorflow ==1.12.2 I restart the runtime as they suggest(I tried otherwise too) and install cuda and restart the runtime again(tried otherwise here also).</p>
  
  <pre><code>!pip install tensorflow-gpu==1.12.2
  
  !wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
  !dpkg -i cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb
  !apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub
  !apt-get update
  !apt-get install cuda=9.0.176-1
  </code></pre>
  
  <p>This way has worked even up untill 2019 but it is not working for me now. I need a solution with using pip or without using pip.</p>
  
  <p>I tried below code as well to uninstall the current version and installed 1.12 but it did not work. And I know that the colab does not recommend installing tensorflow using pip. </p>
  
  <pre><code>!pip uninstall tensorflow-gpu -y
  </code></pre>