当前位置:   article > 正文

PyCharm提示 Backend Qt5Agg is interactive backend. Turning interactive mode on._backend qtagg is interactive backend. turning inte

backend qtagg is interactive backend. turning interactive mode on.

目录

方法一:将matplotlib的backend设置为非交互式。[推荐]

方法二:pip install opencv-python。

方法三:勾选 Gevent compatible


PyCharm 运行程序时突然出现下面错误

Backend Qt5Agg is interactive backend. Turning interactive mode on.

主要有 3 种方法,推荐方法一。 

方法一:将matplotlib的backend设置为非交互式。[推荐]

  • 找到 matplotlibrc 文件,并用记事本打开,路径如下:

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

  •  将 #backend:Agg  修改为去掉注释 ——backend:Agg 

 修改后的样子如下:

## 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

方法二:pip install opencv-python

方法三:勾选 Gevent compatible

在pycharm窗口下,选择 File --> Settings --> Build, Execution, Deployment --> Python Debugger, 将Gevent compatible进行勾选,应用即可。此时最好重新打开窗口进行运算。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/一键难忘520/article/detail/884243
推荐阅读
  

闽ICP备14008679号