Issue
I'm trying to run this 10 line .ipynb file from Google Colab in Microsoft Azure Machine Learning Studio
https://colab.research.google.com/drive/1o_-QIR8yVphfnbNZGYemyEr111CHHxSv?usp=sharing
When I get to this step:
import gradio as gr
import tensorflow as tf
from transformers import TFGPT2LMHeadModel, GPT2Tokenizer
I get this error:
ContextualVersionConflict: (Flask 1.0.3 (/anaconda/envs/azureml_py36/lib/python3.6/site-packages), Requirement.parse('Flask>=1.1.1'), {'gradio'})
I tried to install the Flask 1.1.1 version but I get more errors. Any idea what I should do to get past this step in Azure ML Studio?
!pip install –force-reinstall Flask==1.1.1
// More errors
Solution
The issue is because gradio
package using existing Flask package (version 1.0.3). But as your application required Flask>=1.1.1, therefore it is showing error. You need to uninstall the existing Flask package and then install the latest required version.
To uninstall the existing package:
!pip uninstall Flask -y
To install latest package:
!pip install Flask>=1.1.1
Then, make sure to restart your runtime to pick up the new Flask using the Runtime -> Restart runtime menu.
Finally, import gradio.
Answered By - UtkarshPal-MT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.