【问题标题】:pip install command error out with exit status 1 when installing matplotlib安装 matplotlib 时 pip install 命令错误退出状态为 1
【发布时间】:2020-02-24 02:25:43
【问题描述】:

我正在尝试在 Windows 10 上使用 pip 命令安装 matplotlib,但它给了我一个错误并以状态 1 退出。我已经寻找了几个小时来解决这个错误,但无法删除该错误。这是错误。 然后它会创建并复制很多红色字体的文件。

最后我也得到了退出状态 2。

【问题讨论】:

  • this thread 的副本,请参阅已接受的答案
  • 感谢您的发帖,但我已经尝试过此解决方案。它对我不起作用。 @crissal
  • 你能用 Python 3.7.x 代替 Python 3.8 吗?

标签: python pip


【解决方案1】:

您缺少 freetype,这是从源代码构建 python 所需的外部依赖项,您需要这样做,因为我们尚未发布 Matplotlib 的 py38 轮子(我们正在努力)。

现在按照https://matplotlib.org/devel/contributing.html#retrieving-and-installing-the-latest-version-of-the-code 的说明设置MPLLOCALFREETYPE=1 环境变量,让Matplotlib 为您构建freetype 的本地副本。这将是未来版本的默认行为。

【讨论】:

    【解决方案2】:

    我没有得到正确答案,为什么它会给出错误或如何解决它,但我通过在评论部分中@crissal 的建议将 python 3.8.0 切换到 3.7.5 解决了我的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-14
      • 2020-07-19
      • 1970-01-01
      • 2021-07-12
      • 1970-01-01
      • 1970-01-01
      • 2018-09-21
      • 2020-10-13
      相关资源
      最近更新 更多