я новичок в этом новом языке с именем python, и я пытаюсь использовать matplotlib
здесь мой код:
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()
простой пример из pyplot, однако, когда я запускаю его, он дает мнеследующий журнал
runfile('C:/Users/Alex/.spyder-py3/temp.py', wdir='C:/Users/Alex/.spyder-py3')
Traceback (most recent call last):
File "<ipython-input-22-b33263e553df>", line 1, in <module>
runfile('C:/Users/Alex/.spyder-py3/temp.py', wdir='C:/Users/Alex/.spyder-py3')
File "C:\Users\Alex\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 704, in runfile
execfile(filename, namespace)
File "C:\Users\Alex\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Alex/.spyder-py3/temp.py", line 2, in <module>
plt.plot([1, 2, 3, 4])
File "C:\Users\Alex\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 2811, in plot
is not None else {}), **kwargs)
File "C:\Users\Alex\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 935, in gca
return gcf().gca(**kwargs)
File "C:\Users\Alex\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 578, in gcf
return figure()
File "C:\Users\Alex\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 525, in figure
**kwargs)
File "C:\Users\Alex\Anaconda3\lib\site-packages\matplotlib\backend_bases.py", line 3217, in new_figure_manager
fig = fig_cls(*args, **kwargs)
File "C:\Users\Alex\Anaconda3\lib\site-packages\matplotlib\figure.py", line 361, in __init__
self.bbox = TransformedBbox(self.bbox_inches, self.dpi_scale_trans)
File "C:\Users\Alex\Anaconda3\lib\site-packages\matplotlib\transforms.py", line 1036, in __init__
raise ValueError("'transform' must be an instance of "
ValueError: 'transform' must be an instance of 'matplotlib.transform.Transform'
я не знаю, что я делаю неправильно, я использую python 3.7.1, может кто-нибудь мне помочь?