zoukankan      html  css  js  c++  java
  • 【python-err】pip安装 matplotlib 时问题记录

    problem

    在使用pip3 install matplotlib==3.0.3时遇到如下问题

    Collecting matplotlib==3.0.3
    Downloading matplotlib-3.0.3.tar.gz (36.6 MB)
    |████████████████████████████████| 36.6 MB 4.2 MB/s 
    ERROR: Command errored out with exit status 1:
    command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-y4m52gve/matplotlib_2a451fa2ef644074a5a57f0c114f3628/setup.py'"'"'; __file__='"'"'/tmp/pip-install-y4m52gve/matplotlib_2a451fa2ef644074a5a57f0c114f3628/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-y8nekcs3
    cwd: /tmp/pip-install-y4m52gve/matplotlib_2a451fa2ef644074a5a57f0c114f3628/
    Complete output (47 lines):
    ============================================================================
    Edit setup.cfg to change the build options
    
    BUILDING MATPLOTLIB
    matplotlib: yes [3.0.3]
    python: yes [3.5.2 (default, Oct 7 2020, 17:19:02) [GCC
    5.4.0 20160609]]
    platform: yes [linux]
    
    REQUIRED DEPENDENCIES AND EXTENSIONS
    numpy: yes [version 1.16.5]
    install_requires: yes [handled by setuptools]
    libagg: yes [pkg-config information for 'libagg' could not
    be found. Using local copy.]
    freetype: no [The C/C++ header for freetype2 (ft2build.h)
    could not be found. You may need to install the
    development package.]
    png: no [pkg-config information for 'libpng' could not
    be found.]
    qhull: yes [pkg-config information for 'libqhull' could not
    be found. Using local copy.]
    
    OPTIONAL SUBPACKAGES
    sample_data: yes [installing]
    toolkits: yes [installing]
    tests: no [skipping due to configuration]
    toolkits_tests: no [skipping due to configuration]
    
    OPTIONAL BACKEND EXTENSIONS
    agg: yes [installing]
    tkagg: yes [installing; run-time loading from Python Tcl /
    Tk]
    macosx: no [Mac OS-X only]
    windowing: no [Microsoft Windows only]
    
    OPTIONAL PACKAGE DATA
    dlls: no [skipping due to configuration]
    
    ============================================================================
    * The following required packages can not be built:
    * freetype, png
    * Try installing freetype with `apt-get install
    * libfreetype6-dev` and pkg-config with `apt-get
    * install pkg-config`
    * Try installing png with `apt-get install
    * libpng12-dev` and pkg-config with `apt-get install
    * pkg-config`
    ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    View Code

    系统环境:

    ubuntu16.04

    python3.5

    原因

    When freetype-config is missing, setup.py crashes with TypeError. This fixes it and allows the "required packages" info to be printed.
    The bug is in the handling of searching for a freetype installation. If you install the Linux package freetype-dev, you will avoid this bug and be able to compile matplotlib.

    解决方法

    sudo apt-get install libfreetype6-dev

    参考

    1. pip安装 matplotlib 时问题记录

    2. ubuntu 14.04, pip cannot upgrade matplotllib

    3. Fixes TypeError when installing without freetype #3414

  • 相关阅读:
    2013.4.15 Particle Swarm Optimization with Skyline Operator for Fast Cloudbased Web Service Composition
    Adaptive service composition in flexible processes
    2013.4.13 DomainSpecific Service Selection for Composite Services
    2013.4.14 Modeling and Algorithms for QoSAware Service Composition in VirtualizationBased Cloud Computing
    2013.5.29 Towards Networkaware Service Composition in the Cloud
    Efficient algorithms for Web services selection with endtoend QoS constraints
    SQL Server中常用的SQL语句
    接口限流自定义注解
    linux服务器生产环境搭建
    MVEL自定义函数重复掉用报错:duplicate function
  • 原文地址:https://www.cnblogs.com/happyamyhope/p/14167026.html
Copyright © 2011-2022 走看看