AttributeError: module ‘sip’ has no attribute ‘setapi’的解决办法

本文参考:https://blog.51cto.com/4292565/2451307

pip install matplotlib后报错:AttributeError: module ‘sip’ has no attribute 'setapi’的解决办法:

import matplotlib.pyplot as plt

改为

import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt

把matplotlib的backend从Agg配置为TkAgg

你可能感兴趣的:(深度学习,机器学习,matplotlib)