tensorflow / data-validation

Library for exploring and validating machine learning data
Apache License 2.0
758 stars 172 forks source link

Error installing tensorflow_data_validation #242

Closed andysingal closed 1 year ago

andysingal commented 1 year ago

Hi, I am trying to install tensorflow_data_validation in google colab with Python 2.X but getting the following error:

!pip install -q tensorflow_data_validation
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

I was trying to run the following notebook: https://colab.research.google.com/drive/1tx6I0iEzGrCesuBaum5VWkUI8sKWZeEP#scrollTo=7bMUsv3JwU2A. Looking forward to hearing from you. Thanks, Ankush Singal

singhniraj08 commented 1 year ago

@andysingal,

This issue is because of the reason that Colab has updated the python version to 3.10 and python 3.10 support for TFDV is still work in progress. Meanwhile we are working on Python 3.10 support for all TFX packages, we have introduced an workaround to run Colab tutorials as mentioned here.

You can refer this example gist for TFDV installation steps in Colab. Thank you!

AdrienLemaire commented 1 year ago

Getting the same issue with Qwiklabs "Introduction to TensorFlow Data Validation"

https://github.com/GoogleCloudPlatform/training-data-analyst

navigate to training-data-analyst > courses > machine_learning > deepdive2 > production_ml > labs, and open tfdv_basic_spending.ipynb.

The example gist for TFDV installation doesn't seem to work there

%%shell
update-alternatives
# !pip install tfx
%%shell
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 3
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py

Result:

  Cell In[13], line 3
    update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 3
                                                   ^
SyntaxError: invalid syntax
singhniraj08 commented 1 year ago

@AdrienLemaire, This workaround is specific to Colab notebooks where we downgrade the python version in colab runtime. I am not sure if this workaround will work on other platforms. You can try running the notebooks in Colab environment or downgrade the Python version to 3.9 in your environment meanwhile we work on introducing python 3.10 support. Thank you!

andysingal commented 1 year ago

But isn't downloading python version a temporary workaround?. I hope you can also update your documentation.

singhniraj08 commented 1 year ago

@andysingal,

TFX tutorials is updated with Caution section to inform users about the issue and the temporary workaround. Thanks.

singhniraj08 commented 1 year ago

@andysingal,

Python 3.10 support is introduced in TFDV 1.14.0 release. Please let us know if you face any issues in TFDV installation. Thank you!

singhniraj08 commented 1 year ago

Closing this due to inactivity. Please take a look into the answers provided above, feel free to reopen and post your comments(if you still have queries on this). Thank you!