A similar error appeared with the Python Control library, and it was solved readily solved by updating the library.
!pip install matplotlib