Error Message when Creating SageMaker Training Report using xgboost_report

0

Get the following import error message:

opt/conda/lib/python3.7/site-packages/bokeh/core/templates.py in <module> 41 42 # External imports ---> 43 from jinja2 import Environment, Markup, FileSystemLoader 44 45 # Bokeh imports

ImportError: cannot import name 'Markup' from 'jinja2' (/opt/conda/lib/python3.7/site-packages/jinja2/init.py)

1개 답변
0

Hello,

I understand that you are facing an ImportError when Creating SageMaker Training Report using xgboost_report. This error might indicate compatibility issues with the two third party packages (bokeh and Jinja2).

Please verify if the dependencies for bokeh are as outlined in [1]. The required version of Jinja2 should be >= 2.9 based on bokeh documentation. Moreover, note that from JInja2 version 3.0.1 calling Markup from jinja2 was deprecated, use markupsafe.Markup [2] instead. You can import this library as follows [3]:

from markupsafe import Markup

I trust this information finds you well.

Third Party References:

  1. https://docs.bokeh.org/en/latest/docs/first_steps/installation.html
  2. https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0
  3. https://stackoverflow.com/questions/71645272/importerror-cannot-import-name-markup-from-jinja2
AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠