Error displaying widget: model not found

i just try to create new anaconda cloud env using python 3.10

i try to run my code with my lib and got this error: “Error displaying widget: model not found”

i try to search over internet event ask built-in AI assist and install ipympl and a lot of command but still not solved .

i try simple code on stackoverflow:

import numpy as np
import matplotlib.pyplot as plt
%matplotlib widget

x = np.linspace(-4, 4, 100)
y = np.sin(x)

plt.plot(x,y)```

it simply still get error , looking how to fix it more than hours, hope someone in this community can help. thank in advance

What commands did you run to install ipympl?

!pip install ipympl
as normal, please advice