赞
踩
目录
方法一:将matplotlib的backend设置为非交互式。[推荐]
方法二:pip install opencv-python。
PyCharm 运行程序时突然出现下面错误
Backend Qt5Agg is interactive backend. Turning interactive mode on.
主要有 3 种方法,推荐方法一。
D:\Anaconda3\envs\[your environment]\Lib\site-packages\matplotlib\mpl-data\matplotlibrc
比如我的是:
D:\Anaconda\pkgs\matplotlib-base-3.3.2-py38hba9282a_0\Lib\site-packages\matplotlib\mpl-data\matplotlibrc
修改后的样子如下:
## You can also deploy your own backend outside of matplotlib by
## referring to the module name (which must be in the PYTHONPATH) as
## 'module://my_backend'.
#backend : Agg
backend : Agg
在pycharm窗口下,选择 File --> Settings --> Build, Execution, Deployment --> Python Debugger, 将Gevent compatible进行勾选,应用即可。此时最好重新打开窗口进行运算。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。