发生异常: NotImplementedError
Implement enable_gui in a subclass
Traceback (most recent call last):
File "E:\anaconda\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "E:\anaconda\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Users\机械革命\.vscode\extensions\ms-python.python-2020.3.71659\pythonFiles\lib\python\debugpy\wheels\debugpy\__main__.py", line 45, in <module>
cli.main()
File "c:\Users\机械革命\.vscode\extensions\ms-python.python-2020.3.71659\pythonFiles\lib\python\debugpy\wheels\debugpy/..\debugpy\server\cli.py", line 429, in main
run()
File "c:\Users\机械革命\.vscode\extensions\ms-python.python-2020.3.71659\pythonFiles\lib\python\debugpy\wheels\debugpy/..\debugpy\server\cli.py", line 266, in run_file
runpy.run_path(options.target, run_name=compat.force_str("__main__"))
File "E:\anaconda\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "E:\anaconda\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "E:\anaconda\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Users\机械革命\Desktop\PyTorch Code\PyTorch Train\PT29 Image Argumentation.py", line 13, in <module>
d2l.plt.imshow(img)
File "E:\anaconda\lib\site-packages\matplotlib\pyplot.py", line 2677, in imshow
__ret = gca().imshow(
File "E:\anaconda\lib\site-packages\matplotlib\pyplot.py", line 926, in gca
return gcf().gca(**kwargs)
File "E:\anaconda\lib\site-packages\matplotlib\pyplot.py", line 603, in gcf
return figure()
File "E:\anaconda\lib\site-packages\matplotlib\pyplot.py", line 545, in figure
**kwargs)
File "E:\anaconda\lib\site-packages\matplotlib\backend_bases.py", line 3252, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
canvas = cls.FigureCanvas(figure)
File "E:\anaconda\lib\site-packages\matplotlib\backends\backend_qt5agg.py", line 21, in __init__
super().__init__(figure=figure)
File "E:\anaconda\lib\site-packages\matplotlib\backends\backend_qt5.py", line 230, in __init__
super().__init__(figure=figure)
File "E:\anaconda\lib\site-packages\matplotlib\backend_bases.py", line 1582, in __init__
self._fix_ipython_backend2gui()
File "E:\anaconda\lib\site-packages\matplotlib\backend_bases.py", line 1629, in _fix_ipython_backend2gui
ip.enable_matplotlib()
File "E:\anaconda\lib\site-packages\IPython\core\interactiveshell.py", line 3419, in enable_matplotlib
self.enable_gui(gui)
File "E:\anaconda\lib\site-packages\IPython\core\interactiveshell.py", line 3378, in enable_gui
raise NotImplementedError('Implement enable_gui in a subclass')
NotImplementedError: Implement enable_gui in a subclass
在import d2lzq_pytorch as d2l 之后
每次使用d2l.plt都会报错
希望大家能帮忙解决一下,谢谢
[bug描述]
在import d2lzq_pytorch as d2l 之后 每次使用d2l.plt都会报错 希望大家能帮忙解决一下,谢谢
版本信息 pytorch: 1.4.0 torchvision: torchtext: ...