You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
1 import ml_metadata as mlmd
2 from ml_metadata.proto import metadata_store_pb2
----> 3 from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext
4
5 connection_config = metadata_store_pb2.ConnectionConfig()
~/.local/lib/python3.7/site-packages/tfx/orchestration/experimental/interactive/interactive_context.py in
35
36 import absl
---> 37 import jinja2
38 import nbformat
39 from tfx import types
~/.local/lib/python3.7/site-packages/jinja2/init.py in
10 from .bccache import FileSystemBytecodeCache
11 from .bccache import MemcachedBytecodeCache
---> 12 from .environment import Environment
13 from .environment import Template
14 from .exceptions import TemplateAssertionError
~/.local/lib/python3.7/site-packages/jinja2/environment.py in
23 from .compiler import CodeGenerator
24 from .compiler import generate
---> 25 from .defaults import BLOCK_END_STRING
26 from .defaults import BLOCK_START_STRING
27 from .defaults import COMMENT_END_STRING
~/.local/lib/python3.7/site-packages/jinja2/defaults.py in
1 # -- coding: utf-8 --
2 from ._compat import range_type
----> 3 from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
4 from .tests import TESTS as DEFAULT_TESTS # noqa: F401
5 from .utils import Cycler
~/.local/lib/python3.7/site-packages/jinja2/filters.py in
11 from markupsafe import escape
12 from markupsafe import Markup
---> 13 from markupsafe import soft_unicode
14
15 from ._compat import abc
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
The text was updated successfully, but these errors were encountered:
hilliao
changed the title
Python markupsafe dependency error
Python markupsafe dependency error in 03-training-formalization.ipynb
Jun 23, 2022
The latest Python 3 package markupsafe is not compatible with from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext:
Error:
ImportError Traceback (most recent call last)
/tmp/ipykernel_1/3645963042.py in
1 import ml_metadata as mlmd
2 from ml_metadata.proto import metadata_store_pb2
----> 3 from tfx.orchestration.experimental.interactive.interactive_context import InteractiveContext
4
5 connection_config = metadata_store_pb2.ConnectionConfig()
~/.local/lib/python3.7/site-packages/tfx/orchestration/experimental/interactive/interactive_context.py in
35
36 import absl
---> 37 import jinja2
38 import nbformat
39 from tfx import types
~/.local/lib/python3.7/site-packages/jinja2/init.py in
10 from .bccache import FileSystemBytecodeCache
11 from .bccache import MemcachedBytecodeCache
---> 12 from .environment import Environment
13 from .environment import Template
14 from .exceptions import TemplateAssertionError
~/.local/lib/python3.7/site-packages/jinja2/environment.py in
23 from .compiler import CodeGenerator
24 from .compiler import generate
---> 25 from .defaults import BLOCK_END_STRING
26 from .defaults import BLOCK_START_STRING
27 from .defaults import COMMENT_END_STRING
~/.local/lib/python3.7/site-packages/jinja2/defaults.py in
1 # -- coding: utf-8 --
2 from ._compat import range_type
----> 3 from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
4 from .tests import TESTS as DEFAULT_TESTS # noqa: F401
5 from .utils import Cycler
~/.local/lib/python3.7/site-packages/jinja2/filters.py in
11 from markupsafe import escape
12 from markupsafe import Markup
---> 13 from markupsafe import soft_unicode
14
15 from ._compat import abc
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 kernelThe text was updated successfully, but these errors were encountered: