最新の安定バージョンを使用して、最新matplotlib (1.2.1)
の Python インストール (2.7.4) に の最新の安定バージョンをインストールしましたIPython (0.13.2)
。
私は実行matplotlib.test()
し、最終結果は次のとおりです。
matplotlib.test() のまとめ
----------------------------------------------------------------------
Ran 1251 tests in 857.869s
FAILED (KNOWNFAIL=312, SKIP=3, failures=2)
/home/avazquez/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/__init__.py:1033: UserWarning: This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
warnings.warn(_use_error_msg)
Out[2]: False
このメッセージをどのように解釈すればよいですか? matplotlib
インストールはテストに失敗しましたか?
それが役立つ場合、以下はより詳細な出力です。
matplotlib.test() の実行
In [1]: import matplotlib
In [2]: matplotlib.test()
....K...K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K...K..K..K..K..K..K..K..K..K..K..K..K...K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K...K.SSS.K..............K..K..K..K..K..K..KK.................................................................K....K....K...K..K..K.K..KK....K..K..K..K......................................................................................................................................................................................K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K..K........K.......K...K..K..K..K..K..K...K..K..K.....K..K.....
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/font_manager.py:1224: UserWarning: findfont: Font family ['sans-serif'] not found. Falling back to Bitstream Vera Sans
(prop.get_family(), self.defaultFamily[fontext]))
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/font_manager.py:1234: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=normal:stretch=normal:size=14.0. Returning /opt/Python-2.7.3-x86_64/lib/python2.7/site-packages/matplotlib-1.2.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf
UserWarning)
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/font_manager.py:1234: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=bold:stretch=500:size=14.0. Returning /opt/Python-2.7.3-x86_64/lib/python2.7/site-packages/matplotlib-1.2.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf
UserWarning)
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/font_manager.py:1224: UserWarning: findfont: Font family ['sans serif'] not found. Falling back to Bitstream Vera Sans
(prop.get_family(), self.defaultFamily[fontext]))
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/font_manager.py:1234: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=italic:variant=normal:weight=750:stretch=500:size=14.0. Returning /opt/Python-2.7.3-x86_64/lib/python2.7/site-packages/matplotlib-1.2.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf
UserWarning)
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/font_manager.py:1234: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=200:stretch=500:size=14.0. Returning /opt/Python-2.7.3-x86_64/lib/python2.7/site-packages/matplotlib-1.2.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf
UserWarning)
/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/font_manager.py:1234: UserWarning: findfont: Could not match :family=Bitstream Vera Sans:style=normal:variant=normal:weight=500:stretch=100:size=14.0. Returning /opt/Python-2.7.3-x86_64/lib/python2.7/site-packages/matplotlib-1.2.0-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/ttf/Vera.ttf
UserWarning)
FFK..K.......K..K..K..K..K/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/gridspec.py:298: UserWarning: This figure includes Axes that are not compatible with tight_layout, so its results might be incorrect.
warnings.warn("This figure includes Axes that are not "
..K..K.........................K....KK
======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 39, in failer
result = f(*args, **kwargs)
File "/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 158, in do_test
'(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /nfs/drive5/opt/python/virtualenvs/work/result_images/test_text/font_styles.png vs. /nfs/drive5/opt/python/virtualenvs/work/result_images/test_text/font_styles-expected.png (RMS 47.353)
======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 39, in failer
result = f(*args, **kwargs)
File "/home/james/opt/python/virtualenvs/work/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 158, in do_test
'(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /nfs/drive5/opt/python/virtualenvs/work/result_images/test_text/font_styles_pdf.png vs. /nfs/drive5/opt/python/virtualenvs/work/result_images/test_text/font_styles-expected_pdf.png (RMS 23.423)
インストールログの一部は次のとおりです。
virtualenv から matplotlib をインストールする:
$ pip install matplotlib
Downloading/unpacking matplotlib
Downloading matplotlib-1.2.1.tar.gz (38.4MB): 38.4MB downloaded
Running setup.py egg_info for package matplotlib
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.2.1
python: 2.7.4 (default, Apr 21 2013, 18:37:10) [GCC 4.1.2
20080704 (Red Hat 4.1.2-50)]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.7.1
freetype2: 9.10.3
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.10
Tkinter: no
* Using default library and include directories for
* Tcl and Tk because a Tk window failed to open.
* You may need to define DISPLAY for Tk to work so
* that setup can determine where your libraries are
* located. Tkinter present, but header files are not
* found. You may need to install development
* packages.
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
PySide: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
dateutil: matplotlib will provide
pytz: matplotlib will provide
OPTIONAL USETEX DEPENDENCIES
dvipng: 1.5
ghostscript: 8.70
latex: 3.141592
pdftops: 3.00
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo']
warning: no files found matching 'KNOWN_BUGS'
warning: no files found matching 'INTERACTIVE'
warning: no files found matching 'make.osx'
warning: no files found matching 'MANIFEST'
warning: no files found matching '__init__.py'
warning: no files found matching 'examples/data/*'
warning: no files found matching 'lib/mpl_toolkits'
warning: no files found matching 'lib/matplotlib/mpl-data/matplotlib.conf'
warning: no files found matching 'lib/matplotlib/mpl-data/matplotlib.conf.template'
warning: manifest_maker: MANIFEST.in, line 16: 'recursive-include' expects <dir> <pattern1> <pattern2> ...
warning: no files found matching 'LICENSE*' under directory 'license'
Installing collected packages: matplotlib
Running setup.py install for matplotlib
basedirlist is: ['/usr/local', '/usr']
============================================================================
BUILDING MATPLOTLIB
matplotlib: 1.2.1
python: 2.7.4 (default, Apr 21 2013, 18:37:10) [GCC 4.1.2
20080704 (Red Hat 4.1.2-50)]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.7.1
freetype2: 9.10.3
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.10
Tkinter: no
* Using default library and include directories for
* Tcl and Tk because a Tk window failed to open.
* You may need to define DISPLAY for Tk to work so
* that setup can determine where your libraries are
* located. Tkinter present, but header files are not
* found. You may need to install development
* packages.
Gtk+: no
* Building for Gtk+ requires pygtk; you must be able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
PySide: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
dateutil: matplotlib will provide
pytz: matplotlib will provide
OPTIONAL USETEX DEPENDENCIES
dvipng: 1.5
ghostscript: 8.70
latex: 3.141592
pdftops: 3.00
[Edit setup.cfg to suppress the above messages]
============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil.zoneinfo']
TKinter?
また、matplotlib のインストールが報告されていることにも驚いていますTkinter: No
。インポートできTkinter
ますIPython
:
In [1]: import Tkinter
In [2]: _tkinter.TK_VERSION
Out [2]: '8.5'
In [3]: Tkinter.__version__
Out[3]: '$Revision: 81008 $'