AttributeError: module 'matplotlib' has no attribute 'verbose'
Answered
I'm using Pycharm to draw a picture.The xx.py can run on the terminal while it can'not run in pycharm. how do I solve the problem?
Please sign in to leave a comment.
I have been encountering the same problem since I upgraded matplotlib from 2.1.x to 2.2.0 with conda.
However,
```python
import matplotlib.pylot as plt
```
works fine in python/ipython shell.
I'had found the bug as Ysu27 said, so I have returned the matplotlib from 2.2.0 to 2.1.2 with pip.
firstly, uninstall the matplotlib 2.2.0
then,run the code on the terminal
----------------------------------------------
pip install matplotlib==2.1.2
----------------------------------------------
enjoy it!
This is exactly what I did. It's resolved for now but a bug fix will be necessary.
I followed the advice on this page and it worked: https://stackoverflow.com/a/49158765/4898209
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.
Issue is fixed for 2018.1: https://youtrack.jetbrains.com/issue/PY-28836. We'll try to backport it to 2017 version.
I have a similar problem for Pycharm Professional 2021.1.3, in that it says matplotlib.pyplot has no attribute 'show'.
@Mwall's solution worked: Simply uncheck the box "Show plots in toolwindow" under File | Settings | Tools | Python Scientific