Error installing tensorflow 2.2 on Colab as well as Anaconda

Finally solved it.

install anaconda
use conda prompt for the following:

  1. navigate to your assignment folder
  2. conda create -n tf210 tensorflow=2.1.0 python=3.7
  3. conda activate tf210
  4. pip install tensorflowjs==2.0.0
  5. pip install tensorflow-intel==0.0.1
  6. pip install tensorflow-cpu==2.1.0
  7. pip install tensorflow-estimator==2.1.0rc0
  8. pip install tensorflow==2.2.0
  9. pip install jupyter notebook
  10. pip install matplotlib
  11. jupyter notebook

once the notebook is up

!pip install tensorflow==2.2 (comment this)

!pip install tensorflowjs (and this)

import tensorflowjs as tfjs (run this)
import tensorflow as tf (and this)

print(‘\u2022 Using TensorFlow Version:’, tf.version)

returns “• Using TensorFlow Version: 2.2.0”

run all

at the final code cell when using tensorflowjs_converter you will get a warning: (this doesn’t matter)

2023-04-14 21:45:55.710045: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library ‘cudart64_101.dll’; dlerror: cudart64_101.dll not found
2023-04-14 21:45:55.710065: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

go to your assignment folder and you will see 10 bin shards and your model.json
zip then submit

6 Likes