Plotly express not working with IPython?

I posted this already on stack-overflow but thought to post it here as well for more traction.

I’m trying out the line example here but via an IPython console.

Reproduce

import plotly.express as px

if __name__ == "__main__":
    import IPython; IPython.embed(using=False)

Run it (e.g. python myfile.py)

Paste the official example:

In [1]:     df = px.data.gapminder().query("country=='Canada'")
   ...:     fig = px.line(df, x="year", y="lifeExp", title='Life expectancy in Canada')
   ...:     fig.show()
   ...: 

In [2]: 

Nothing happens. Any ideas? Works fine if I simply start IPython directly from my OS terminal and then paste the above - but not when dove via a python script.