Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.1 图像增广 d2l.plt.imshow(img)报错 #116

Open
ChaseTheThrone opened this issue Apr 6, 2020 · 0 comments
Open

9.1 图像增广 d2l.plt.imshow(img)报错 #116

ChaseTheThrone opened this issue Apr 6, 2020 · 0 comments

Comments

@ChaseTheThrone
Copy link

ChaseTheThrone commented Apr 6, 2020

[bug描述]

发生异常: 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都会报错
希望大家能帮忙解决一下,谢谢

版本信息
pytorch: 1.4.0
torchvision:
torchtext:
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant