【问题标题】:Unable to install matplotlib on aws linux server无法在 aws linux 服务器上安装 matplotlib
【发布时间】:2018-07-10 11:54:25
【问题描述】:

我尝试使用以下命令在 linux 服务器上安装 matplotlib,但它失败了……解决此问题的指南。

python -mpip install matplotlib
RuntimeError: sh ./configure failed.

Failed building wheel for subprocess32
  Running setup.py clean for subprocess32
Failed to build subprocess32
cloud-init 0.7.6 requires argparse, which is not installed.
cloud-init 0.7.6 requires cheetah, which is not installed.
cloud-init 0.7.6 requires oauth, which is not installed.
cloud-init 0.7.6 requires PrettyTable, which is not installed.
cloud-init 0.7.6 requires pyserial, which is not installed.


命令“/usr/bin/python -u -c”导入设置工具, tokenize;file='/tmp/pip-install-Ex80fQ/subprocess32/setup.py';f=getattr(tokenize, 'open', open)(file) ;code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" 安装 --record /tmp/pip-record-lOrC6I/install-record.txt --single-version-externally-managed --compile" 失败,错误代码 1 在 /tmp/pip-install-Ex80fQ/subprocess32/

【问题讨论】:

    标签: matplotlib


    【解决方案1】:

    用 sudo apt-get 试试:

    sudo apt-get build-dep python-matplotlib
    

    【讨论】:

      【解决方案2】:

      可能是因为您使用的 AWS linux 映像没有安装 C 编译器。

      要安装,这取决于您的发行版,但对我来说: sudo yum groupinstall "Development Tools"

      之后我还必须为 python 开发者安装头文件:https://stackoverflow.com/a/21530768

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-12-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-08-11
        • 1970-01-01
        相关资源
        最近更新 更多