Skip to content Skip to sidebar Skip to footer

Matplotlib: Importerror: Cannot Import Name 'pyplot'

I have matplotlib lib installed using pip but when I run this code it gives me this error: shar@shar-Lenovo-G50-30 ~ $ python3 opencv.py Traceback (most recent call last): File '

Solution 1:

Make sure you don't have any file names matplotlib.py that you have created if any then rename or delete that file. It worked for me

Solution 2:

Did you get error saying "cannot import name 'pyplot' from partially initialized module 'matplotlib' " ?

You could have unknowingly saved your file name as matplotlib.py, since it comes as default file name suggestion. So change the file name and Bingo, you will not get that error again..

Post a Comment for "Matplotlib: Importerror: Cannot Import Name 'pyplot'"