【问题标题】:Python crashing while launching matplotlib启动 matplotlib 时 Python 崩溃
【发布时间】:2016-04-19 08:23:56
【问题描述】:

我在我的 Windows 操作系统中使用 32 位的 python 3.4。在启动 matplotlib.pyplot 时,由于 python 无法正常工作,python 崩溃并出现错误。

import matplotlib.pyplot as plt
plt.plot([1,2,3],[4,1,2])

在 ipython notebook 中运行上述代码后,出现“Python 已停止工作”的错误,如下所示:

【问题讨论】:

  • 提前谢谢回复。
  • @AlexL 我在 Windows 操作系统上使用 python 3.5.1 :: Anaconda 2.5.0 (32bit)。我正在使用 matplotlib 1.5.1 版。在github解决方案的链接中给出了在导入matplotlib mpl.rcParams['backend'] = "qt4agg" mpl.rcParams['backend.qt4'] = "PySide" 之后添加以下代码行。但这对我的事业有帮助,你能帮我找出崩溃的原因吗?
  • 根据您提供的链接,这是 python 3.4 的错误,在 python 3.5 中已解决。虽然我使用的是 python 3.5 ,但我仍然遇到这个问题。

标签: python python-3.x matplotlib ipython


【解决方案1】:

此问题现已解决。将 matplotlib 更新到最新的 2.0.0 版本。

pip install matplotlib --upgrade

【讨论】:

    【解决方案2】:

    将 matplotlib 更新到最新版本:

    pip3 install matplotlib --upgrade
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-04
      • 1970-01-01
      • 2021-02-16
      • 1970-01-01
      • 2020-06-10
      • 2016-09-28
      • 1970-01-01
      • 2013-09-22
      相关资源
      最近更新 更多