cannot import name 'animation' from 'matplotlib'

Viewed 388

I try import matplotlib with:

import matplotlib.pyplot as plt

But I get this error:

ImportError: cannot import name 'animation' from 'matplotlib' (C:\Users\David\AppData\Roaming\Python\Python37\site-packages\matplotlib_init_.py).

I removed and reinstalled matplotlib, I tried installing older matplotlib version.

1 Answers

In my case, updating matplotlib and restarting the kernel (in Jupyter notebook) solved the issue. I installed this version:

pip install --user matplotlib==3.5.0b1

I realise this question is 10 months old now. Hope it helps other users.

Related