0

I want to run this code from GitHub and it uses TensorFlow 1.14.0. I used google colab pro but could not install TensorFlow 1.14.0 on both GPU and TPU. I have tried these solutions:

%tensorflow_version 1.x

from here as SvitlanaGA...supportsUkraine said, but I got this error :

ValueError: Tensorflow 1 is unsupported in Colab.

Your notebook should be updated to use Tensorflow 2.

and this code did not work for me:

!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

I uninstalled TensorFlow and installed TensorFlow 1.14.0 as below:

!pip uninstall tensorflow
!pip install tensorflow==1.14.0

and I got this error:

ERROR: Could not find a version that satisfies the requirement tensorflow==1.14.0 
(from versions: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0)
ERROR: No matching distribution found for tensorflow==1.14.0

using !pip install --ignore-installed --upgrade tensorflow==1.14.0 and !pip install tensorflow-gpu==1.14.0 led to the same result. So, how can I install and use TensorFlow 1.14.0 on google colab pro with GPU and TPU?

I'mahdi
  • 23,382
  • 5
  • 22
  • 30
Atefeh Rashidi
  • 485
  • 1
  • 8
  • 32
  • read [this](https://stackoverflow.com/questions/73215696/did-colab-suspend-tensorflow-1-x#:~:text=I%20found%20out%20that%20unfortunately,of%202022%2F8%2F11.&text=Probably%20the%20most%20annoying%20thing,codebases%20to%20TF2%20from%20TF1.) or try [this](https://stackoverflow.com/a/73426036/1740577) – I'mahdi Dec 01 '22 at 19:24
  • @I'mahdi faced this error again: ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.14 – Atefeh Rashidi Dec 01 '22 at 19:39
  • Sorry, I don't have any idea – I'mahdi Dec 01 '22 at 19:48
  • 2
    Colab has Python 3.8 installed, which does not support Tensorflow versions 2.1 or below. You would need to install a different Python version on Colab first. – xdurch0 Dec 01 '22 at 20:29

0 Answers0