我直接装了一个anaconda3,用的是里面的python3,然后运行import matplotlib.pyplot as plt会有以下错误:
Traceback (most recent call last):
File "E:\PyCharm 4.5.1\helpers\pydev\pydev_ipython\inputhook.py", line 502, in enable_gui
gui_hook = guis[gui]
KeyError: 'qt5'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\PyCharm 4.5.1\helpers\pydev\pydev_ipython_console_011.py", line 120, in enable_gui
return real_enable_gui(gui, app)
File "E:\PyCharm 4.5.1\helpers\pydev\pydev_ipython\inputhook.py", line 508, in enable_gui
raise ValueError(e)
ValueError: Invalid GUI request 'qt5', valid ones are:dict_keys(['none', 'osx', 'tk', 'gtk', 'wx', 'qt', 'qt4', 'glut', 'pyglet', 'gtk3'])
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2885, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
import matplotlib.pyplot as plt
File "E:\PyCharm 4.5.1\helpers\pydev\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "E:\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 2535, in
install_repl_displayhook()
File "E:\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 166, in install_repl_displayhook
ip.enable_gui(ipython_gui_name)
File "E:\PyCharm 4.5.1\helpers\pydev\pydev_ipython_console_011.py", line 122, in enable_gui
raise UsageError("%s" % e)
IPython.core.error.UsageError: Invalid GUI request 'qt5', valid ones are:dict_keys(['none', 'osx', 'tk', 'gtk', 'wx', 'qt', 'qt4', 'glut', 'pyglet', 'gtk3'])
在网上查了一圈都没搞定,老师能帮忙解决下吗?谢谢