解決辦法:在導入matplotlib的時候指定不需要GUI的backend(Agg、Cairo、PS、PDF和SVG)。
import matplotlib.pyplot as plt
plt.switch_backend('agg')
解決辦法:在導入matplotlib的時候指定不需要GUI的backend(Agg、Cairo、PS、PDF和SVG)。
import matplotlib.pyplot as plt
plt.switch_backend('agg')
堆排序小灰 堆排序 # -*- coding:UTF-8 -*- import collections class TreeNode: def __init__(self, x): self.val