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.


import as px

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

Run it (e.g. python

Paste the official example:

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

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.