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 Antwort
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
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen