mlops-with-vertex-ai
mlops-with-vertex-ai copied to clipboard
Python markupsafe dependency error in 03-training-formalization.ipynb
The latest Python 3 package markupsafe is not compatible with from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext:
import ml_metadata as mlmd
from ml_metadata.proto import metadata_store_pb2
from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext
Error:
ImportError Traceback (most recent call last)
/tmp/ipykernel_1/3645963042.py in
~/.local/lib/python3.7/site-packages/tfx/orchestration/experimental/interactive/interactive_context.py in
~/.local/lib/python3.7/site-packages/jinja2/init.py in
~/.local/lib/python3.7/site-packages/jinja2/environment.py in
~/.local/lib/python3.7/site-packages/jinja2/defaults.py in
~/.local/lib/python3.7/site-packages/jinja2/filters.py in
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/jupyter/.local/lib/python3.7/site-packages/markupsafe/init.py)
The workaround is to install an older version by pip install markupsafe==2.0.1
and restart kernel