import matplotlib.pyplot as plt doesn't work

Answered

I know there are some posts about this but nothing helped me. 

I was able to install Matplotlib through preferences -> install packages in PyCharm

If I type only

import matplotlib 

everything is okay and I don't get an error. When .pyplot comes into play I get error messages, whereas IDLE has no problems running this

Example:

import matplotlib.pyplot as plt

x=[1,2,3,4,5,6,7,8]
y=[0.1,0.2,0.5,0.6,0.8,0.8,0.9,1.3]
plt.plot(x,y)
plt.show()

 

and the Error messages: 

How do I solve this problem? Can you please help me step by step. 

Thanks

1 comment

Unfortunately it's known issue https://youtrack.jetbrains.com/issue/PY-28836, the fix will be available in the next PyCharm update.
As a temporary workaround, you could revert to matplotlib 2.1.2.

0

Please sign in to leave a comment.