Fix Matplotlib AttributeError: module ‘sip’ has no attribute ‘setapi’ – Matplotlib Tutorial

By | September 17, 2021

When we are using python matplotlib package, we may get this error: AttributeError: module ‘sip’ has no attribute ‘setapi’. In this tutorial, we will introduce you how to fix it.

How to fix AttributeError: module ‘sip’ has no attribute ‘setapi’?

We can use matplotlib 3.3.0 version to fix this error.

For example, we uninstall it firstly.

pip uninstall matplotlib

Then install matplotlib 3.3.0

pip install matplotlib==3.3.0

Then you will find this error is fixed.