English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

配置环境 Matplotlib

Matplotlib and its dependencies are provided in the form of wheel packages in the standard Python package repository, and Matplotlib can be installed on Windows, Linux, and MacOS systems using the pip package manager. Refer to the following commands:

# Filename: example.py
# Copyright: 2020 By w3codebox
# Author by: it.oldtoolbag.com
# Date: 2020-08-08
python -m pip install -U pip
 python -m pip install -U matplotlib

Python 2.7 or 3.4 versions are not installed for all users, you need to install the redistributable package of Microsoft Visual C++ 2008 (64-bit or 32-bit for Python 2.7) or Microsoft Visual C++ 2010 (64-bit or 32-bit for Python 3.4).

If you use Python 2.7 on Mac, please execute the following command -

# Filename: example.py
# Copyright: 2020 By w3codebox
# Author by: it.oldtoolbag.com
# Date: 2020-08-08
xcode-select –install

During the execution of the above command, the subprocess 32 (dependency) can be compiled. On extremely old versions of Linux and Python 2.7, it may be necessary to install the main version of subprocess32.

Matplotlib richiede molte dipendenze -

Python (>= 2.7 o >= 3.4) NumPy setuptools dateutil pyparsing libpng pytz FreeType cycler six

O, si può anche installare molti pacchetti per abilitare strumenti di interfaccia utente migliori.

tk PyQt4 PyQt5 pygtk wxpython pycairo Tornado

Per supportare meglio i formati di output animazione e file immagine come LaTeX, è possibile installare i seguenti -

_mpeg/avconv ImageMagick Pillow (>=2.0) LaTeX e GhostScript (usato per rendere testo con LaTeX)