Skip to content
Advertisement

IPython deprecation warning when importing display

When I run:

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))

I got

/var/folders/6g/6gqq4lhx4jbcl4_tbrsxj3xr0000gq/T/ipykernel_5625/333572366.py:1: DeprecationWarning: Importing display from IPython.core.display is deprecated since IPython 7.14, please import from IPython display
from IPython.core.display import display, HTML

Advertisement

Answer

replace

from IPython.core.display import display, HTML

with

from IPython.display import display, HTML

source here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement