Traceback (most recent call last):



 "<ipython-input-1-64557277dbff>", line 1, in <module>

get_ipython().run_line_magic('matplotlib', 'qt5')



 "C:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2095, in run_line_magic

result = fn(*args,**kwargs)



 "<decorator-gen-108>", line 2, in matplotlib



 "C:\Anaconda3\lib\site-packages\IPython\core\magic.py", line 187, in <lambda>

call = lambda f, *a, **k: f(*a, **k)



 "C:\Anaconda3\lib\site-packages\IPython\core\magics\pylab.py", line 99, in matplotlib

gui, backend = self.shell.enable_matplotlib(args.gui)



 "C:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2983, in enable_matplotlib

self.enable_gui(gui)



 "C:\Anaconda3\lib\site-packages\ipykernel\zmqshell.py", line 482, in enable_gui

real_enable_gui(gui)



 "C:\Anaconda3\lib\site-packages\ipykernel\eventloops.py", line 337, in enable_gui

raise RuntimeError("Cannot activate multiple GUI eventloops")

RuntimeError: Cannot activate multiple GUI eventloops

Traceback (most recent call last):

 "<stdin>", line 1, in <module>

 "C:\Users\Joey\Anaconda2\lib\site-packages\scipy\optimize\minpack.py", line 651, in curve_fit
res = leastsq(func, p0, args=args, full_output=1, **kwargs)

 "C:\Users\Joey\Anaconda2\lib\site-packages\scipy\optimize\minpack.py", line 377, in leastsq
shape, dtype = _check_func('leastsq', 'func', func, x0, args, n)

 "C:\Users\Joey\Anaconda2\lib\site-packages\scipy\optimize\minpack.py", line 26, in _check_func
res = atleast_1d(thefunc(*((x0[:numinputs],) + args)))

 "C:\Users\Joey\Anaconda2\lib\site-packages\scipy\optimize\minpack.py", line 457, in _weighted_general_function
return weights * (function(xdata, *params) - ydata)

 "<stdin>", line 3, in fit_funcTypeError: only length-1 arrays can be converted to Python scalars