Failed Pip Install in Google Colab


I am having trouble with all labs in this MLEP Course3 that are requiring pip installs similar to the image provided below. It keeps iterating over different versions searching for compatible versions its taking so long I haven’t been able to successfully complete the cell so I am not able to complete the labs following it. I am running the notebooks in google colab. Is there a quick fix to this problem? Has anyone else encountered this problem? It seems like version compatibility issues with the pip install provided.


This is what pip settled on after running the depdendencies cell:

!pip install -U pip
!pip install tensorflow==2.5.3
!pip install tensorflow_transform==1.0.0
!pip install tensorflow_model_analysis==0.32.0
!pip install tensorflow_data_validation==1.1.0
!pip install apache-beam==2.32.0

That said, the staff are now informed about this to fix dependencies.

Hello Balaji,

Thanks for your response. The cell with the pip install was able to successfully run with those versions but there were issues with Functions having specific attributes, parameter input differences being redefined due to version incompatibilities later in the notebook.


Hi Evan! Unfortunately, I can’t replicate the issue. The pip install works for me. Perhaps it was misleading because the markdown says that it should only take a minute. That was the case when this was first deployed. However, with the current versions used, it will actually take 6 to 8 minutes. It has now been revised and you will see it when you reopen it from the classroom. TF was also dropped from the pip install because TFDV includes it in its dependencies. Also, make sure that you’re not using a GPU runtime for this lab. That usually causes problems when TF is downgraded. The team will keep improving the labs for a more seamless experience. In any case, the main takeaways about model analysis will be the same. Hope this helps!

I’m experiencing similar problems on C3_W4_Lab_2_TFX_Evaluator.ipynb and C3_W4_Lab_3_Fairness_Indicators.ipynb.

After running for more than half an hour, both seem to be having issues with resolving dependencies. I am using runtime without GPU.

Hi Michael! Welcome to the community and thank you for reporting! This has now been fixed. Please re-open the notebook from your classroom to see the changes. It seems the new pip dependency resolver is causing the long install times so we used a flag to use the legacy resolver. Thanks!