Problem of tensorflow data validation on google colab

282 views Asked by At

When I import tensorflow data validation using

import tensorflow_data_validation as tfdv

I get

ModuleNotFoundError: No module named 'tensorflow_data_validation'

When I want to install it using

!pip install tensorflow-data-validation

in google colab, I get this error

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ ERROR: Could not find a version that satisfies the requirement tensorflow-data-validation (from versions: none) ERROR: No matching distribution found for tensorflow-data-validation

What is way to run tensorflow data validation in Google Colab?

In my computer these command successfully installed tensorflow data validation.

conda create -n myenv python=3.8

conda activate myenv

pip install tensorflow-data-validation==1.3.0

1

There are 1 answers

2
Amine_h On

You need to downgrade the python version to one of the supported ones (3.8 or 3.9) so you can install it with !pip install tensorflow-data-validation

here is how to do it :

# first install python 3.8
!sudo apt-get update -y
!sudo apt-get install python3.8
# change alternatives
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
# select python version
!sudo update-alternatives --config python3
# check python version
!python --version
# install pip for new python 
!sudo apt-get install python3.8-distutils
!wget https://bootstrap.pypa.io/get-pip.py
!python get-pip.py
# upgrade pip
!sudo apt install python3-pip
!python -m pip install --upgrade pip