In this example I am going to sample from the normal distribution and plot the samples
# nbi:hide_in
from ipywidgets import interact
import numpy as np
import matplotlib.pyplot as plt
def random(sigma, N):
x = np.random.normal(0, sigma, N)
_, _, _ = plt.hist(x)
interact(random, sigma=(0.0,10.0,0.01), N=(0,10000,1))
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) <ipython-input-2-af5910cd26ab> in <module> 1 # nbi:hide_in ----> 2 from ipywidgets import interact 3 import numpy as np 4 import matplotlib.pyplot as plt 5 ModuleNotFoundError: No module named 'ipywidgets'