繁体   English   中英

Python 3 Matplotlib 在 FreeBSD 上安装失败导致“legacy-install-failure”

[英]Python 3 Matplotlib installation failure on FreeBSD resulting in "legacy-install-failure"

我们正在 FreeBSD 上安装 python 3.7,并尝试安装 MatPlotLib。运行python3 -m pip install matplotlib时,我们收到了以下消息以及 output,并且该过程失败。

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> matplotlib

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

在响应的上方,出现以下块:

note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for matplotlib
  Running setup.py clean for matplotlib
Failed to build matplotlib
Installing collected packages: matplotlib
  Running setup.py install for matplotlib ... error
  error: subprocess-exited-with-error

  × Running setup.py install for matplotlib did not run successfully.
  │ exit code: 1
  ╰─> [613 lines of output]

我们知道对这种事情的回应是确保 pip、setuptools 和 wheel 已完全更新,我们已经检查过,它们是。

任何帮助,将不胜感激。

你的错误来自这里:

ERROR: Failed building wheel for matplotlib

wheel 是一个存档的 Python 项目,由一个或多个包及其依赖项组成。

因此, pip无法继续,因为它可能遇到了一些版本冲突。

python3 -m pip list |less可以帮助找到坏人)

从 FreeBSD-12.2-RELEASE 端口集合中, py-matplotlib BUILD依赖于:

  • Python-3.7.9
    • matplotlib-3.3.1
    • numpy-1.16.6
    • 枕头:>6.2
    • 解析 >=0
    • 证书:>=0.10

尝试通过端口树 ( math/py-matplotlib ) 安装matplotlib ,如果依赖项已通过端口树安装,则保证兼容性。 如果没有,您可以重新安装所有 dep。 根据matplotlib需要。 上面的pip list将告诉您发生了什么。

您可以通过pkg install安装它,但它需要在服务器上采取一些预防措施:您必须检查etc/pkg/pkg.conf (系统和本地)并查看更新是否设置为latestreleasequaterly 在您的情况下,根据系统先前的配置方式, release似乎是正确的选择。

对于需要编译步骤的 python 包,比如matplotlib ,我过去常常通过 ports collection(或 pkg repo)安装它们,除非我真的了解它们并且知道它们需要什么。 你会节省你的时间。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM