I can run my program in the terminal, but when I run it directly using Pycharm, it gives
AttributeError: module 'matplotlib' has no attribute 'verbose'
I can run my program in the terminal, but when I run it directly using Pycharm, it gives
AttributeError: module 'matplotlib' has no attribute 'verbose'
I think I found the answer. I was having the same problem. In PyCharm Professional 2017.3, go to File | Settings | Tools | Python Scientific. There is an option there to "Show plots in toolwindow". Uncheck this option. Then it should work ok. It has something to do with PyCharm trying to help you by allowing you to interact with your plots - as hinted at in this issue discussion. https://youtrack.jetbrains.com/issue/PY-26652
Try to install older version of matplotlib like 2.1.0 rather than v 2.2.0
use:
pip uninstall matplotlib
pip install matplotlib==2.1.0
matplotlib.verbose API. This effectively means that all downstream applications (like PyCharm) requiring matplotlib as a third-party dependency now need to blacklist matplotlib 2.2.0 in the hopes that their next stable release will revert this obvious horrifying breakage. In other words, they screwed up. Big time.This is an error on the matplotlib side, verbose was unintentionally removed in matplotlib 2.2.0.
See this issue.
This is fixed from the matplotlib side as of version 2.2.2. (Release here)
If updating is not an option, one less ideal option could be to locate the __init__.py inside the matplotlib folder, and add the line
verbose = Verbose()
after the Verbose() class - that should be around line 384 in the current version.
matplotlib.Verbose API has been deprecated and is expected to be removed within six months. Ergo, reverting to an older version of matplotlib is probably the stabler, safer solution.