Une note quand j'ai mis matplotlib à El Capitan avec pip. C'est normal que pkg-config et freetype ne soient pas inclus, donc il n'y a rien de tel.
Tout d'abord, appuyez sur la commande. Mais j'obtiens une erreur.
$ pip install matplotlib
Collecting matplotlib
Using cached matplotlib-1.5.3.tar.gz
Complete output from command python setup.py egg_info:
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [1.5.3]
python: yes [3.6.0 (v3.6.0:41df79263a11, Dec 22 2016,
17:23:13) [GCC 4.2.1 (Apple Inc. build 5666) (dot
3)]]
platform: yes [darwin]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.11.3]
dateutil: yes [dateutil was not found. It is required for date
axis support. pip/easy_install may attempt to
install it after matplotlib.]
pytz: yes [pytz was not found. pip will attempt to install
it after matplotlib.]
cycler: yes [cycler was not found. pip will attempt to
install it after matplotlib.]
tornado: yes [using tornado version 4.4.2]
pyparsing: yes [pyparsing was not found. It is required for
mathtext support. pip/easy_install may attempt to
install it after matplotlib.]
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: yes [version 1.6.26]
qhull: yes [pkg-config information for 'qhull' could not be
found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: yes [nose 0.11.1 or later is required to run the
matplotlib test suite. Please install it with pip or
your preferred tool to run the test suite / using
unittest.mock]
toolkits_tests: yes [nose 0.11.1 or later is required to run the
matplotlib test suite. Please install it with pip or
your preferred tool to run the test suite / using
unittest.mock]
OPTIONAL BACKEND EXTENSIONS
macosx: yes [installing, darwin]
qt5agg: no [PyQt5 not found]
qt4agg: no [PySide not found; PyQt4 not found]
gtk3agg: no [Requires pygobject to be installed.]
gtk3cairo: no [Requires cairocffi or pycairo to be installed.]
gtkagg: no [Requires pygtk]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
wxagg: no [requires wxPython]
gtk: no [Requires pygtk]
agg: yes [installing]
cairo: no [cairocffi or pycairo not found]
windowing: no [Microsoft Windows only]
OPTIONAL LATEX DEPENDENCIES
dvipng: no
ghostscript: no
latex: no
pdftops: no
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
============================================================================
* The following required packages can not be built:
* freetype
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/8p/6g32nfj53nn59v0py80lzjgx2rswc_/T/pip-build-0vtpc0zd/matplotlib/
Puisqu'il est dit comme ci-dessous, j'ai décidé de mettre les deux en homebrew.
pkg-config is not installed
freetype: no [The C/C++ header for freetype2 (ft2build.h)
could not be found. You may need to install the
development package.]
Tout d'abord, installez ce dont vous avez besoin avec la commande brew, puis
$ brew install pkg-config freetype
Installez à nouveau matplotlib.
$ pip install matplotlib
Cette fois, cela a fonctionné.
Recommended Posts