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?

5 comments

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.

1

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!

 

0

This is exactly what I did. It's resolved for now but a bug fix will be necessary.

0

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. 

 

0

Issue is fixed for 2018.1: https://youtrack.jetbrains.com/issue/PY-28836. We'll try to backport it to 2017 version.

0

Please sign in to leave a comment.