[Solved] kubeflow pipeline visualization component Error: WARNING: Running pip as the ‘root’ user can result in broken permissions and conflicting behaviour with the system package manager…

Problem description

time="2022-05-03T16:20:34.622Z" level=info msg="capturing logs" argo=true
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 
https://pip.pypa.io/warnings/venv
[KFP Executor 2022-05-03 16:20:36,372 INFO]: Looking for component `markdown_vis` in --component_module_path `/tmp/tmp.b0lqT6V169/ephemeral_component.py`
[KFP Executor 2022-05-03 16:20:36,372 INFO]: Loading KFP component "markdown_vis" from /tmp/tmp.b0lqT6V169/ephemeral_component.py (directory "/tmp/tmp.b0lqT6V169" and module name "ephemeral_component")
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/site-packages/kfp/v2/components/executor_main.py", line 104, in <module>
    executor_main()
  File "/usr/local/lib/python3.8/site-packages/kfp/v2/components/executor_main.py", line 94, in executor_main
    executor_input = json.loads(args.executor_input)
  File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.8/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
time="2022-05-03T16:20:36.460Z" level=error msg="cannot save artifact /tmp/outputs/mlpipeline_ui_metadata_path/data" argo=true error="stat /tmp/outputs/mlpipeline_ui_metadata_path/data: no such file or directory"
Error: exit status 1

Solution:

The component in version of client V1 is incompatible with the version of client V2, so the mode parameter is added when the client submits the task

kfp.Client().create_run_from_pipeline_func(markdown_pipeline, mode=kfp.dsl.PipelineExecutionMode.V2_COMPATIBLE,arguments={})

Read More: