matplotlib | module ‘sip’ has no attribute ‘setapi’

I just set up the VS Code with all the Python extensions. Python version is 3.8.3 through Anaconda. The interpreter is venv. When I run this code

import matplotlib.pyplot as plt

An error shows –

Exception has occurred: AttributeError
module 'sip' has no attribute 'setapi'
  File "", line 145, in <module>
    import matplotlib.pyplot as plt

I’ve tried uninstalling and reinstalling matplotlib, but to no avail.

Source: Python-3x Questions

2 thoughts on - matplotlib | module ‘sip’ has no attribute ‘setapi’